+ 2
else Question (python)
Can somebody please correct my code? age = int(input()) name = input() if age>=18; print("Welcome " , name) else: print("Sorry") I don't understand what's wrong with it. I've tried adding the + sign and it's still incorrect.
4 Réponses
+ 1
Oh, disregard wht I said before! You have a syntax error. It should be age>=18:
There's a big difference between the colon ":" and semicolon ";".
+ 1
OH THANKS
0
I have tried to add the plus sign but it doesn't affect anything?
0
No problem! Sorry for misleading in the beginning LOL. Syntax errors escape me all the time haha.