+ 1

Someone explain!!

In this Cheer creator question, My code is almost right except last else statement....how do I print Ra!Ra!Ra!Ra!...... should I use loop??....I did that but not working properly. https://code.sololearn.com/cKqiP09IWF6t/?ref=app

19th May 2020, 1:32 PM
Tejas Joshi
Tejas Joshi - avatar
3 Answers
+ 3
yard = int(input()) if yard > 10: print("High Five") elif yard < 1: print("shh") else: print("Ra!"*yard) if yard is bigger than 10 (no matter how big, it tends to infinity) it will print 'high five' if yard is smaller than 1 (no matter how small, it tends to -infinity) it will print 'shh' else means if the number is between 1 and 10, it will print 'ra!'. * yard means print the same string how many times the yard number represnents
19th May 2020, 1:36 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
+ 2
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Thanks for the hint! i didn't read the string multiplication properly, i edited now! Thanks again!!
19th May 2020, 1:40 PM
Sebastian Pacurar
Sebastian Pacurar - avatar
19th May 2020, 1:39 PM
Tejas Joshi
Tejas Joshi - avatar