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)
8 Antworten
+ 7
F should be uppercase in "High Five"
Else statement can't contain any condition.
else:
print('Ra!'*yards)
+ 2
yards=int(input())
if yards>10:
print('High Five')
elif yards<1:
print('shh')
else:
print('Ra!'*yards)
+ 1
Kwabena Darkey
You have already taken yards as int so no need to cast again
+ 1
Thanks
+ 1
I still dont get what is wrong
+ 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
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
0
yard=int(input())
if yard>10:
print("High Five")
elif yard<1:
print("shh")
elif yard>=1:
print("Ra!" * yard)