0

Why do I keep getting SyntaxError: invalid syntax in line 2?

Here is my code: x=4 If x==5: Print("hello") elif: x==7: Print("greeting") elif: x==4: print("HI")

8th Nov 2016, 8:52 AM
An Bùi
An Bùi - avatar
1 Odpowiedź
+ 4
x=4 if x==5: Print("hello") elif x==7: Print("greeting") elif x==4: print("HI") identations are very important in python also there were obsolete ':' just after the elif statements and the first if was with a capital I
8th Nov 2016, 8:54 AM
Burey
Burey - avatar