Cheer creator challenge to find my error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Cheer creator challenge to find my error

yard = int(input()); if yard > 10 : print ("High Five") if yard == 10 : print("shh") if yard < 10 : for i in [yard]: print ("Ra!")

27th Nov 2021, 11:44 AM
Ermias Kebede
Ermias Kebede - avatar
2 Answers
+ 1
conditions are 1) if greater than 10 2) if less than 1 3) else or in between 1 to 10(inclusive) check your condition for these again ..
27th Nov 2021, 2:55 PM
Jayakrishna 🇮🇳
0
Try this code... yard = int(input()) if yard <1: print("shh") elif 1 < yard < 100: print("Ra!"*yard) elif yard > 100: print("High Five")
27th Nov 2021, 11:51 AM
Ramprasad
Ramprasad - avatar