0

In the code couch cheer creator I pass on all the tests except for test 4, can someone aid please...

yards = int(input()) if (yards > 10): print ('High Five') if (yards >1 and yards < 10): print ('Ra!' * yards) if (yards <= 1): print ('shh')

12th Feb 2020, 8:33 AM
Nico
Nico - avatar
3 Réponses
+ 4
I think your code will do the wrong thing if the input is 1 or 10.
12th Feb 2020, 10:10 AM
Paul
Paul - avatar
+ 3
Take a very close look again at the conditions: 'High Five' (for over 10), 'shh' (for <1), or a string that has a 'Ra!' for every yard that they gained.
12th Feb 2020, 9:46 AM
HonFu
HonFu - avatar
+ 2
Thanks for the assistance, will have a look at my code.
12th Feb 2020, 12:49 PM
Nico
Nico - avatar