0

Why is the following code giving me syntax error in line 5 ? Pls help

This is the code - { x = int(input()) print("level of uogrades: " + str(x)) if x <= 10 print("you are a normal player!") if 10 > x <= 50 print("hmm, you are grinding") if x > 100 print("man, go outside pls") }

28th Mar 2020, 4:19 AM
Ahsen Mirza
Ahsen Mirza - avatar
3 Answers
+ 3
Ahsen Mirza don't forget to add a colon ':' at the end of the if conditions. This will work fine, x = 5 if x <= 10: print("you are a normal player!")
28th Mar 2020, 4:23 AM
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~ - avatar
+ 1
Thanks
28th Mar 2020, 4:24 AM
Ahsen Mirza
Ahsen Mirza - avatar