2
What should I do when this error message appears: "Syntaxerror: unindent does not match any Outer indentation level"?
I cannot declare the Else of the variable. Follow a print of the problem and the code:
escada = 'Sim'
if escada == 'Sim':
print('Subir na escada e trocar a lâmpada')
else:
print('Suba na cadeira')
Copy and paste the text into your question instead of placing screenshots. In general, screenshots are bad enough to disrupt future searches, not be accessible to users with vision difficulties and make it harder for us to run the code on our machine to test, but in your case it’s even worse because you can’t tell just by looking, because the mistake may be in some blank space that we can not see.
– Pablo Almeida
I reiterate what @Pabloalmeida said, really the image is more disturbing than it helps. Your code seems to be indented, but keep in mind one thing, if you use 4 spaces (the recommended) in a chunk use throughout the code, the message seems to indicate that you used different levels of indentation in the code. Python requires the same level throughout the code, try to follow the convention of 4 spaces.
– Sidon
Thanks guys, I didn’t know it was bad. I’ll edit the question and put the code.
– Alineat