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"):
8 Answers
+ 3
Frankly Quite , I think you should include 10 in second conditional check x <=10.
+ 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
+ 3
Frankly Quite , at first sight change "=<" to "<=" and "=>" to ">=". Also remove ":" after the else statement.
+ 2
Frankly Quite , you are welcome 🐱
+ 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
+ 1
Thank you that was it
+ 1
else:
print ("High Five")
0
Can you help me please with the cheer creator game please