Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #calculates the distance a given object has traveled given the time and speed
- def calcDistance(mph = 0, time = 0):
- result = 0
- result = mph*time
- return result
- #calculate the speed of a given object uaing the above spees equation and returning that result
- def calcSpeed(distance = 0, time = 0):
- result = 0
- result = distance/time
- return result
- #This will get you the time it will take to cross a given distance at a given speed
- def calcTime(distance = 0, speed = 0):
- result = 0
- result = distance/speed
- return result
Advertisement
Add Comment
Please, Sign In to add comment