Why do I get an indentation error with correct code?

Why do I keep getting an indentation error? After trying to solve this issue for a while I asked for the solution and had it correct. I reset the exercise and put in all the correct information to see what I was getting wrong. I got an indentation error from Line 29 down. I would delete (or backspace if it makes a difference) to the previous line and hit enter. I then compared that with the solution (I took a snippet so I had it handy) and set the alignment exactly where it was suppose to be (which was literally exactly where I had it before deleting) and rerunning the program. This indentation error then moved to line 30. Rinse and repeat. Now on level 37 it keeps appearing and wont change. Indentation appears right on my end and matches the solution provided. What gives? Am I missing something here or is this a bug?

Now I’m even more frustrated. I just posted this and the format that i see on Github does not match what I see in the Codecademy IDE (if that is the proper name for it. Here is exactly what I see and what I see on the github link I posted.

image

image

So after seeing this I go back to Codecadamy and type in a space. Doesnt work. Try another space. Doesnt work. Try another space. It works. Now the indentation error was on 39. Same thing for that. Repeat it on line 41 as well.

Any reason it is appearing differently between the two causing this error?

The codecademy editor settings are not ideal, i recommend you go to repl.it, codepen or any other site, and indent your code there (or in a editor like atom or vs code on your computer)

1 Like