+ 1

Guys can you please tell me what's the wrong in this cheer creator code? I can't pass case 3!

x = int(input()) if x>10: print("High five") elif 1>x: print("shh") elif x>=1: if x<=10: print("Ra!"*x)

25th Jul 2020, 5:06 AM
Hridita Paul
Hridita Paul - avatar
9 Antworten
+ 4
x = int(input()) if x>10: # This should be >= print("High five") elif 1>x: # This line is not correct x<=1 print("shh") elif x>=1: # This line is nothing if x<=10: print("Ra!"*x)
25th Jul 2020, 6:05 AM
BroFar
BroFar - avatar
+ 3
Hridita Paul x = int(input()) # 10 yards or more if x>=10: # error in the High five to Five print("High Five") # 1 yard or less elif x<=1: print("shh") # from 2 yards to 9 yards elif x<=9: print("Ra!"*x)
25th Jul 2020, 5:43 AM
BroFar
BroFar - avatar
+ 2
Hridita Paul There is a mistake in High five. This should be High Five.
25th Jul 2020, 5:22 AM
A͢J
A͢J - avatar
+ 2
Yeah, I changed the "five" to "Five" and it was correct! Thank you guys!
25th Jul 2020, 5:54 AM
Hridita Paul
Hridita Paul - avatar
+ 2
Hridita Paul did you try 1 on your code ? and then 4 ?
25th Jul 2020, 5:56 AM
BroFar
BroFar - avatar
+ 2
Try entering 4 on your code it will respond as shh
25th Jul 2020, 5:59 AM
BroFar
BroFar - avatar
+ 2
Yeah, the 4th line is not correct. And the 6th line doesn't mean any different. It could be written anyway with only else. Thanks anyway!!
25th Jul 2020, 6:08 AM
Hridita Paul
Hridita Paul - avatar
+ 1
Brofar, sorry but what 1? I didn't understand your question.
25th Jul 2020, 5:58 AM
Hridita Paul
Hridita Paul - avatar
+ 1
No. I tried to enter 4 on my code on Code Playground and it responded as Ra!Ra!Ra!Ra!
25th Jul 2020, 6:02 AM
Hridita Paul
Hridita Paul - avatar