Guest User

Untitled

a guest
Jan 22nd, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. record = float(input())
  2. distance = float(input())
  3. speed = float(input())
  4.  
  5. time_needed = distance * speed
  6. time_slowed_down = (distance // 15) * 12.5
  7. time_needed = time_needed + time_slowed_down
  8.  
  9. if time_needed < record:
  10.     print(f" Yes, he succeeded! The new world record is {time_needed:.2f} seconds.")
  11.  
  12. if time_needed > record:
  13.     print(f"No, he failed! He was {(time_needed - record):.2f} seconds slower.")
Add Comment
Please, Sign In to add comment