Created
January 5, 2018 02:45
-
-
Save alixander/e7538f767722154966a89f9c4bb543a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A turtle and rabbit are in a race. | |
The race is 100 meters. | |
The turtle moves 2 meters per minute. | |
The rabbit moves 5 meters per minute. | |
Right before the rabbit passes the finish line, he sleeps for half an hour. | |
Write a function that simulates a race between the two | |
and return the final number of meters moved after one of them wins. | |
Assume the race is measured in seconds (e.g. seconds are the smallest unit of time) | |
""" | |
def race(): | |
turtle_meters = 0 | |
rabbit_meters = 0 | |
return turtle_meters, rabbit_meters | |
print(race()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment