0

Code Coach: Cheer Creator

I am currently working on this problem but I am stumped on the code that I have tried so far. My code isn't giving me synyax errors but if I try any other operation in the last if statement, I don't get an output. Any suggestions? I feel like I'm so close with this one! https://sololearn.com/compiler-playground/cYM1XyV41Wwh/?ref=app

8th Feb 2024, 4:15 PM
Nicole Krason
5 Respostas
+ 5
Yep, you are close enough. Your last statement should be "else" statement instead of "if" that needs to be multiple by yards inside your print() statement. Something like this: else: print("Ra!" * yards) Try to re-read task again. Most of the answers are already explained in the given description.
8th Feb 2024, 4:25 PM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 5
Congratulations, you did it Nicole Krason and figured out the error in code! 👏
8th Feb 2024, 4:47 PM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 1
D Shah 🎯⏳️ thank you! Python is frustrating at times but I know the most I practice, the better I'll understand it! Thank you!
8th Feb 2024, 4:50 PM
Nicole Krason
0
D Shah 🎯⏳️ Okay! I tried putting in else yards == 1 and it gave me an invalid syntax. I'm going to try this out and see if that works (it should)
8th Feb 2024, 4:31 PM
Nicole Krason
0
D Shah 🎯⏳️ so changing the if to else did work but then I still had one task that was wrong. All I had to do was change the second if to elif and it worked! I'm proud of myself 😅
8th Feb 2024, 4:38 PM
Nicole Krason