Project 10: IndentationError

If i run the code then it shows "IdentationError: Unident does not match any outer Identation level

@gaman1802
‘except’ must be in the alignment with ‘try’.Accordingly indent statements within the except.

3 Likes

The statements in your except block specifically are not indented properly.
Make sure that the print statements in except block are aligned with the "if " and “sensor_value>…”(in try block).

Hope this helped.

2 Likes

thanks for resolving my problem

1 Like

try and except should be given same alignment. Also check whether tabs and whitespaces are mixedup which also leads to indentation error in python.