0
Help with Code coach Challenge "Roadrunner".
I think I misunderstand the Input values. In the Challenge it's said input 1. Roadrunner and Coyote distance from safety spot 2. Roadrunner Speed 3. Coyote speed. (Everything in feet per sec) Sample Input: 10 5 20 Output: Meep Meep (Output when Roadrunner can escape) Roadrunner reach it in 2 Sec and Coyote is 30 feet away. How's that calculated? Edit: also why's the Coyote with 20 feet per sec slower than 5 feet per sec
6 Answers
+ 4
Felix Alcor
The distance between Coyote and Roadrunner is 50 feet and both are from safety point so if Roadrunner is at 10 feet distance then Coyote distance would be 10 + 50 = 60
2nd input is the speed of Roadrunner
3rd input is the speed of Coyote
So now you have to get time so
roadrunner time = 10 / 5 = 2.0
coyote time = (10 + 50) / 20 = 3.0
now compare both time and print result.
+ 2
Felix Alcor
Check the first line of the description
A coyote is chasing a roadrunner and they start out 50 feet apart. If you know how fast they are both traveling, and how far the roadrunner is from safety, determine whether or not the coyote is able to catch the roadrunner.
Both animals and the roadrunner's safe place are on a straight line.
+ 1
Already found it Out myself 10/5 = 2 sec and (10+50)/20=3sec. I didn't see that they start 50feet apart.
+ 1
A͢J Thanks I have overflown the description and didn't see the 50feet apart start.
+ 1
A͢J Everything finished đ
https://code.sololearn.com/cciqddpphNA8/?ref=app
0
a = int(input())
b = int(input())
c = int(input())
d = 50
if a/b < (a + d)/c:
print("Meep Meep")
else:
print("Yum")