My code is:
90 if needinexam > 100:
91 print "We are sorry, but you are unable to get an A* in this class."
92 else:
93 print "You need " + final + "% in your Unit 3 controlled assessment to get an A*"
94
95 elif unit2Done == "n":
96
97 else:
98 print "Sorry. That's not a valid answer."
and the error is:
line 97
else:
^
IndentationError: expected an indented block
I have absolutely no idea why I'm getting this error, but maybe you guys can help me. There are A LOT of if/else/elif statements around it so that may be confusing me. Any help is greatly appreciated, thank you!
EDIT: Adding "pass" or code into the elif statement just moves the same error to line 95.
Try this:
elif unit2Done == "n":
pass # this is used as a placeholder, so the condition's body isn't empty
else:
print "Sorry. That's not a valid answer."
The problem here is that the body of the unit2Done == "n"
condition can not be empty. In this case, a pass
must be used as a kind of placeholder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With