SHARE
TWEET

Swimming record

a guest Nov 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. record_in_seconds = float(input())
  2. distance_in_meters = float(input())
  3. time_per_meter_seconds = float(input())
  4.  
  5. record_to_beat = distance_in_meters * time_per_meter_seconds
  6. slow_down = (distance_in_meters // 15) * 12.5
  7.  
  8. total_time = record_to_beat + slow_down
  9.  
  10. if record_in_seconds > total_time :
  11.     print(f"Yes, he succeeded! The new world record is {abs(total_time):.2f} seconds.")
  12. else:
  13.     time = record_in_seconds - total_time
  14.     print(f"No, he failed! He was {abs(time):.2f} seconds slower.")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top