My elif is syntax erroring [RESOLVED, Check answers] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

My elif is syntax erroring [RESOLVED, Check answers]

Else = the END of the if/else thing, If goes first, then elif, then lastly else! print('ALl you have to do is type 1 and press enter.') x=input() if x=='1': print('You did it! :D') else: print('RESTART THE PROGRAM AND TRY AGAIN') elif x=='2': print(' What do you think you are doing?')

24th Mar 2017, 2:12 PM
Sammy Bunckly
Sammy Bunckly - avatar
1 Answer
+ 5
put your elif before your else. when you start a chain of if statements, they end when you hit else
24th Mar 2017, 3:48 AM
LordHill
LordHill - avatar