Advertisement
Guest User

Ups and Downs

a guest
Dec 20th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. # http://www.thebigquestions.com/2018/12/19/ups-and-downs/
  2.  
  3. from __future__ import division
  4.  
  5. # Yards.
  6. ESC_DIST = 100
  7. STAIR_DIST = 100
  8.  
  9. # Yards/minute.
  10. WALK_SPEED = 10
  11. ESC_SPEED = 10
  12.  
  13. # Minutes.
  14. WAIT_TIME = 1
  15.  
  16. alice_time = ESC_DIST/(ESC_SPEED + WALK_SPEED) + STAIR_DIST/WALK_SPEED
  17. bob_time = ESC_DIST/(ESC_SPEED + WALK_SPEED) + STAIR_DIST/WALK_SPEED
  18.  
  19. resting_alice_time = WAIT_TIME + (ESC_DIST - ESC_SPEED*WAIT_TIME)/(ESC_SPEED + WALK_SPEED) + STAIR_DIST/WALK_SPEED
  20. resting_bob_time = ESC_DIST/(ESC_SPEED + WALK_SPEED) + WAIT_TIME + STAIR_DIST/WALK_SPEED
  21.  
  22. print alice_time, bob_time
  23. print resting_alice_time, resting_bob_time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement