0

Help please (solved)

Can some one tell me why I get an error yards = int(input("")) if yards < 1: print("shh") elif yards =< 1 && yards => 10: print("Ra!" * yards) else print("High Five"):

8th Apr 2020, 5:29 PM
Frankly Quite
Frankly Quite - avatar
8 odpowiedzi
+ 3
Frankly Quite , I think you should include 10 in second conditional check x <=10.
8th Apr 2020, 5:47 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 6
yards = int(input("")) if yards < 1: print("shh") elif yards >= 1 and yards <= 10: print("Ra!" * yards) else: print("High Five") it seems like you came from programming languages like C type because instead of "and" you using && and many more. you need to revise python again
8th Apr 2020, 5:35 PM
minirkk
minirkk - avatar
+ 3
Frankly Quite , at first sight change "=<" to "<=" and "=>" to ">=". Also remove ":" after the else statement.
8th Apr 2020, 5:32 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
Frankly Quite , you are welcome 🐱
8th Apr 2020, 5:50 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
x = int(input("")) if x < 1: print("shh") elif x >= 1 and x < 10: print("Ra!" * x) else: print("High Five") I made it like this but and I got all the cases except case 4
8th Apr 2020, 5:42 PM
Frankly Quite
Frankly Quite - avatar
+ 1
Thank you that was it
8th Apr 2020, 5:49 PM
Frankly Quite
Frankly Quite - avatar
+ 1
else: print ("High Five")
9th Apr 2020, 4:21 AM
Ashish Singh
Ashish Singh - avatar
0
Can you help me please with the cheer creator game please
8th Apr 2020, 5:37 PM
Frankly Quite
Frankly Quite - avatar