New course! Every coder should learn Generative AI!
Try a free lesson0
Why I can't pass test #3 in cheer creator through python?
yards = int(input()) x = yards//10 if (yards < 1): print("shh" * 1); elif(yards <= 10 and yards >=1): print("Ra!" * yards); else: print("High five\n" * x);
11 Answers
+ 7
Harsh ,
In else statement capitalize the first letter of the word 'five'...see task description and provide spelling as it is...
And what is the purpose of 'x' here.??..it is not needed...remove that line and as well as in else statement....
+ 7
Harsh ,
Iam too a learner like you...
I just encountered a mistake as much as I can able to...
+ 3
EAJUDDIN don't complete the code you can give the hint until the opponent will not understand but firstly, give the hint.
+ 2
Use search bar in Sololearn
https://www.sololearn.com/Discuss/3226261/?ref=app
https://www.sololearn.com/Discuss/3216943/?ref=app
https://www.sololearn.com/Discuss/3216100/?ref=app
https://www.sololearn.com/Discuss/3211734/?ref=app
https://www.sololearn.com/Discuss/3193277/?ref=app
https://www.sololearn.com/Discuss/3052104/?ref=app
https://www.sololearn.com/Discuss/3052104/?ref=app
https://www.sololearn.com/Discuss/3029776/?ref=app
+ 1
Sakshi Thanks for your advice. I will keep this in mind in the future.
+ 1
Riya If nobody told you, I am telling you, "You are genius".
Where everyone is looking for mistakes in my coding statements, you went for telling the real mistake. Now, I see why you are mentor. You really deserve this place.
Salute to you madam! 🫡🫡
And thanx a lot for this help, I will keep it in mind in future. Also, I created a variable x because I thought for every 10 yard, it should be printed.
You know, mind plays very silly things when it becomes irritated! 😅
0
Harsh If you put the number in the variable named yard without input method then maybe it will work or use the below code it will work.
n=int(input())
if n<1:
print("shh")
elif n>1 and n<=10:
print(n*"Ra!")
elif n>10:
print("High Five")
0
Sakshi I went for it mam but, I didn't found enough relevant but, thanx for helping and giving me your precious time.
It means a lot! ☺️
0
EAJUDDIN Well, try the code coach, your code will show an error.
Why don't you give a try?
Although, thanx for your help, it meant a lot! ☺️
0
You should remove x maybe…. Idk but it could help!
0
Ovik Ovik Nah, I got my mistake but, thanks for your time! ☺️