Why I can't pass test #3 in cheer creator through python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

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);

19th Jul 2023, 12:06 PM
Harsh
Harsh - avatar
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....
19th Jul 2023, 12:19 PM
Riya
Riya - avatar
+ 7
Harsh , Iam too a learner like you... I just encountered a mistake as much as I can able to...
19th Jul 2023, 4:22 PM
Riya
Riya - avatar
+ 3
EAJUDDIN don't complete the code you can give the hint until the opponent will not understand but firstly, give the hint.
19th Jul 2023, 12:36 PM
Sakshi
Sakshi - avatar
+ 1
Sakshi Thanks for your advice. I will keep this in mind in the future.
19th Jul 2023, 1:31 PM
EAJUDDIN
EAJUDDIN - avatar
+ 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! 😅
19th Jul 2023, 3:15 PM
Harsh
Harsh - avatar
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")
19th Jul 2023, 12:19 PM
EAJUDDIN
EAJUDDIN - avatar
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! ☺️
19th Jul 2023, 3:16 PM
Harsh
Harsh - avatar
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! ☺️
19th Jul 2023, 3:18 PM
Harsh
Harsh - avatar
0
You should remove x maybe…. Idk but it could help!
20th Jul 2023, 7:00 AM
Ovik Ovik
0
Ovik Ovik Nah, I got my mistake but, thanks for your time! ☺️
20th Jul 2023, 10:12 AM
Harsh
Harsh - avatar