Program show error

what’s wrong in this code?


@mohdamaan2805 In python identation is everything because there are no braces or brackets for code. So you should write the following code in this manner:

Result of this is:
doubt1

Identation menas the code of if block should be one level deeper than the normal code, the code will clear your doubts :slight_smile:

Do close the query by clicking on the solution button

1 Like

You missed indentation in the code every line that’s part of the if or else statement should begin after some space so it all can be considered as part of one block and the subsequent lines after that can be written without spaces…
e.g
maths =“yes”
if maths == “yes”:
___print(“you will get toffee”)
else:
___print(“you will not get anything”)
print(“outside the conditional statement”)
The underscore is space since bolt forum is not showing spaces I have used underscore.