Skip to content
← Back to Community
Red Squiggly LInes
Profile icon
BataviaShaCon

How in the world do you fix errors properly in my students code? Many of the errors started off as indentation errors and when they go back and line everything up, they still get the errors. Can anyone advise me on how to help them out?

Voters
Profile icon
AubreyMostowski
Profile icon
nessyy
Profile icon
ljaemontefalcon
Profile icon
SophieWest
Profile icon
Javien16459
Profile icon
Kai_Justice
Profile icon
BataviaShaCon
Comments
hotnewtop
Profile icon
ElmaHaque

no

Profile icon
Kai_Justice

I suggest making sure that their indentation size is the same for each line, deleting the indentation for lines that have the problem. (Warning : doing so is extremely tedious and annoying, and has a chance of not working anyways.)
Good luck and hope you figure this out.

Profile icon
AdCharity

I assume it's python? I'd teach them proper indentation to start with, as well as simple debugging techniques (like how to find and locate errors). Also, if there are errors and it's not being caused by incorrect spacing, then it's likely because variables are out of scope/never defined, concepts are being applied incorrectly, among other things.

Profile icon
slip1244

you can batch indent or de indent things by highlighting groups of lines and doing tab or shift tab, if it makes it easier. either way you'll have to deindent and indent almost every line before python accepts the indentation because of its very bad system of defining code blocks.