kalin_inkov

Lecture2ExZad7

Sep 22nd, 2020
1,035
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. record_s = float(input())
  4. meters = float(input())
  5. s_meter = float(input())
  6. # #need_time = round((meters * s_meter), 2)
  7. # need_time = meters/15
  8. # need_time = math.floor(need_time)
  9. # need_time = need_time*12.50
  10. need_time = meters*s_meter
  11. #need_time = math.floor(need_time)
  12.  
  13.  
  14.  
  15. from math import floor
  16.  
  17. late_time = floor((meters/15.00))*12.50
  18.  
  19. total_time = need_time + late_time
  20. if record_s < total_time:
  21.     fail = total_time - record_s
  22.  
  23.     print(f"No, he failed! He was {fail:.2f} seconds slower.")
  24. if record_s >= total_time:
  25.     print(f"Yes, he succeeded! The new world record is {total_time:.2f} seconds.")
  26.     # print(total_time)
  27.     # print(need_time)
  28.     # print(late_time)
  29.     #print(a)
  30.  
  31.  
RAW Paste Data