+ 1

Cheer Creator Code Coach Problem

In the Cheer Creator code coach, I've encoutered a bug on specifically test input#4 but because the input was hidden i don't know what to fix. Please help https://code.sololearn.com/c30rOJTgoeZr/?ref=app

23rd May 2023, 12:36 PM
Bambang Primanto
Bambang Primanto - avatar
7 Respostas
+ 6
No. There is clearly mentioned input format is an integer value.... edit: Bambang Primanto oh. that's fine, ingoring the line separater there. I just checked your code. for case to output "Ra!", input should be 1 to 10 both inclusive. so input 10 comes into this case so use condition as yard >= 1 and yard <= 10
23rd May 2023, 1:08 PM
Jayakrishna 🇮🇳
+ 5
Is there asked to 'Ra' *yard times in same line or separate lines? Do check this case..!
23rd May 2023, 12:42 PM
Jayakrishna 🇮🇳
+ 1
I could copy the problem so it's easier for anyone that's willing to help
23rd May 2023, 12:43 PM
Bambang Primanto
Bambang Primanto - avatar
+ 1
Task Given the number of yards that your team moved forward, output either 'High Five' (for over 10), 'shh' (for <1), or a string that has a 'Ra!' for every yard that they gained. Input Format An integer value that represents the number of yards gained or lost by your team. Output Format A string of the appropriate cheer.
23rd May 2023, 12:44 PM
Bambang Primanto
Bambang Primanto - avatar
+ 1
If that were the case then test input#1 (which is shown what the input are) comes out correct. The input was 5 and the code resulted in Ra! Ra! Ra! Ra! Ra! Which was considered correct. My hypothesis is test#4 comes as a float that aren't round number that makes the computer confused because it wants integer but was given float
23rd May 2023, 12:55 PM
Bambang Primanto
Bambang Primanto - avatar
+ 1
Omg thanks. I thought it's 10 and over is high five because the 10 yard rule in american football. Tested the revised in code coach and no bug arrived
23rd May 2023, 1:31 PM
Bambang Primanto
Bambang Primanto - avatar
+ 1
You're welcome.
23rd May 2023, 1:33 PM
Jayakrishna 🇮🇳