Why does this give me an indentation error?

I’m having trouble with this exercise and a couple other like this…

Here’s my code in a repl.it so all the spacing/indention will be the same:

I feel like it should work, but instead I get the error:

 File "script.py", line 4
    return True
IndentationError: unindent does not match any outer indentation level

How do I fix this?

Replace all the indentation manually with two or four spaces.

1 Like

Huh. Ok, thanks, that works. I’m confused as to why though…

1 Like

Mixed tabs and spaces is usually the problem.

We can get around this with a simpler return statement…

return num1 > num2 * 2
1 Like

Oooh I see what you mean… Thanks a lot, I was stuck on that for awhile!