0

Cheer Creator

What is wrong with my code yards=int(input()) if yards>10: print('High five') elif yards<1: print('shh') else:yards<=10 print('Ra!'*yards)

7th Dec 2021, 9:02 AM
Universal Knight
Universal Knight - avatar
8 Answers
+ 7
F should be uppercase in "High Five" Else statement can't contain any condition. else: print('Ra!'*yards)
7th Dec 2021, 10:37 AM
Simba
Simba - avatar
+ 2
yards=int(input()) if yards>10: print('High Five') elif yards<1: print('shh') else: print('Ra!'*yards)
7th Dec 2021, 9:13 AM
SoloProg
SoloProg - avatar
+ 1
Kwabena Darkey You have already taken yards as int so no need to cast again
7th Dec 2021, 9:35 AM
A͢J
A͢J - avatar
+ 1
Thanks
7th Dec 2021, 9:42 AM
Universal Knight
Universal Knight - avatar
+ 1
Kwabena Darkey if yards is less than 10 then it cannot be greater than 1 So last condition is wrong And second case also there should be < only
7th Dec 2021, 9:51 AM
A͢J
A͢J - avatar
0
I still dont get what is wrong
7th Dec 2021, 9:43 AM
Universal Knight
Universal Knight - avatar
0
yards=int(input()) if yards>10: print('High five') elif yards<10: print('shh') else: print('Ra!'*yards) I think you had some logic mistake please update it
8th Dec 2021, 4:46 AM
tejas dabholkar
0
yard=int(input()) if yard>10: print("High Five") elif yard<1: print("shh") elif yard>=1: print("Ra!" * yard)
18th Jan 2022, 11:26 AM
sebas