0

Roadrunner code coach question

Hi everyone! I have passed 4 out of 5 case tests but im not sure whats wrong with mine..... heres the problem: 3 inputs, safety distance, roadrunner speed (feet /second), and coyote speed(feet/sec). given that the roadrunner has a 50 ft head start, create a string that says Meep Meep if the roadrunner is safe, Yum if the coyote caught him. safedistance = int(input()) rrspeed = int(input()) coyspeed = int(input()) if coyspeed > rrspeed: spdiff = coyspeed - rrspeed else: spdiff = rrspeed - coyspeed catchuptime = 50/spdiff if catchuptime*rrspeed >= safedistance: print("Meep Meep") else: print("Yum") im thinking maybe i need something for the scenario where they would be equal speed, in which case the roadrunner would always be safe. Thoughts? Thanks!!!

30th Oct 2020, 11:36 PM
Brenner Pieszak
Brenner Pieszak - avatar
2 Answers
31st Oct 2020, 1:47 AM
Simba
Simba - avatar
0
Thanks would anyone include a bit of an explanation for me??? You all rock!
31st Oct 2020, 5:46 PM
Brenner Pieszak
Brenner Pieszak - avatar