Ddimov90

truck_driver_06_03

Oct 2nd, 2025
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | Source Code | 0 0
  1. season = input()
  2. km_per_month = float(input())
  3.  
  4. total_km = km_per_month * 4
  5. total_earned = 0
  6.  
  7. if km_per_month <= 5000:
  8.     if season == "Winter":
  9.         total_earned = 1.05 * total_km
  10.     elif season == "Summer":
  11.         total_earned = 0.9 * total_km
  12.     else:
  13.         total_earned = 0.75 * total_km
  14.  
  15. elif 5000 < km_per_month <= 10000:
  16.     if season == "Winter":
  17.         total_earned = 1.25 * total_km
  18.     elif season == "Summer":
  19.         total_earned = 1.1 * total_km
  20.     else:
  21.         total_earned = 0.95 * total_km
  22.  
  23. elif 10000 < km_per_month <= 20000:
  24.     total_earned = 1.45 * total_km
  25.  
  26. total_earned *= 0.9
  27.  
  28. print(f"{total_earned:.2f}")
  29.  
Advertisement
Add Comment
Please, Sign In to add comment