+ 4
Cheer Creator
I tried to Program the cheer Creator with python: yards = int(input()) if yards>10: print("high five") elif yards<1: print("shh") elif yards<=10 and yards>=1: print(length*"Ra!") Test Case 3 always fails. What am I missing?
9 Answers
+ 3
The H and F of the "High Five" will be capital
and it will be
print(yards*"Ra!")
not
print(length*"Ra!")
+ 4
b = int(input())
if b < 1:
print("shh")
if b <= 10:
print("Ra!"*b)
if b > 10:
print('High Five')
+ 3
yards=int(input())
if yards > 10:
print("High Five")
elif yards < 1:
print("shh")
else:
print("Ra!" * yards)
+ 2
Test 3 is failing probably because it is a decimal so you have to round off your answer to the nearest whole number
Your code should be:
yards = int(input))
if yards < 1:
print("shh")
elif yards > 10:
print("High Five")
elif yards >= 1:
print(int(yards)*"Ra!")
+ 1
Im having issues with this. I pass the conditions that i catb see but fail in one of the locked conditions. I cannot see where my code is wrong:
dist = int(input())
cheer = "Ra!"
if dist<1:
print("shh")
elif dist>=10:
print("High Five")
elif dist>=1 and dist<10:
print(cheer*dist)
0
Thank you!
0
yard = int(input())
if yard > 10:
print ("High Five")
elif yard <1:
print("shh")
else:
print ("Ra!"*yard)
0
yards = int(input())
if yards>10:
print("High Five")
elif yards<1:
print("shh")
elif yards<=10 and yards>=1:
print(yards*"Ra!")
0
yards = int(input())
if yards>10:
print("High Five")
elif yards<1:
print("shh")
elif yards<=10 and yards>=1:
print(yards*"Ra!")