I think this looks like Python 3 to me.
I am guessing the problem is that Python expects a statement in your
elif a == "1":
block. But you have not put a statement there. So, to compile and move on from this statement, put a
pass
.
But, even if you do, nothing would work. For two reasons:
1. You are not reading the value for the number (you did not use the input method, again)
2. You are using
elif
to check values and then take two steps.
Note that when you ask the user to put in the number, they put in, and then you move to the next line. But elif will not execute because one statement within this
if...elif...else
structure has been executed. Python will not check any other conditions or execute the code. So you can either put the input statement within this block (
elif a == "yes":
) or read it after the
print("blah blah blah")
line.
Read these for more on the topic:
4. More Control Flow Tools — Python 3.10.6 documentation[
^] (if...else, pass statement, etc.)