Cheer Creator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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?

6th Mar 2020, 5:05 AM
Smircs
Smircs - avatar
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!")
6th Mar 2020, 5:13 AM
Utkarsh Sharma
Utkarsh Sharma - avatar
+ 4
b = int(input()) if b < 1: print("shh") if b <= 10: print("Ra!"*b) if b > 10: print('High Five')
14th May 2021, 7:22 PM
Behruz Bahromov
Behruz Bahromov - avatar
+ 3
yards=int(input()) if yards > 10: print("High Five") elif yards < 1: print("shh") else: print("Ra!" * yards)
5th Apr 2020, 1:27 PM
JAHANGEER LATEEF WANI
JAHANGEER LATEEF WANI - avatar
+ 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!")
10th Nov 2020, 3:07 PM
PurestSurvivor
PurestSurvivor - avatar
+ 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)
31st Mar 2023, 5:54 AM
John McCarthy-Ward
John McCarthy-Ward - avatar
0
Thank you!
6th Mar 2020, 5:58 AM
Smircs
Smircs - avatar
0
yard = int(input()) if yard > 10: print ("High Five") elif yard <1: print("shh") else: print ("Ra!"*yard)
30th Apr 2022, 7:09 PM
Akash Ganera
0
yards = int(input()) if yards>10: print("High Five") elif yards<1: print("shh") elif yards<=10 and yards>=1: print(yards*"Ra!")
13th Nov 2022, 8:51 PM
Anita chaubey
Anita chaubey - avatar
0
yards = int(input()) if yards>10: print("High Five") elif yards<1: print("shh") elif yards<=10 and yards>=1: print(yards*"Ra!")
13th Nov 2022, 8:51 PM
Anita chaubey
Anita chaubey - avatar