BbJLeB

04. Car To Go

May 12th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. # 04. Car To Go
  2. budget = float(input())
  3. season = input()
  4. if budget <= 100:
  5.     car_class = "Economy class"
  6.     if season == "Summer":
  7.         car_type = "Cabrio"
  8.         budget = budget * 0.35
  9.     else:
  10.         car_type = "Jeep"
  11.         budget = budget * 0.65
  12. elif budget <= 500:
  13.     car_class = "Compact class"
  14.     if season == "Summer":
  15.         car_type = "Cabrio"
  16.         budget = budget * 0.45
  17.     else:
  18.         car_type = "Jeep"
  19.         budget = budget * 0.80
  20. else:
  21.     car_class = "Luxury class"
  22.     car_type = "Jeep"
  23.     budget = budget * 0.90
  24. print(f"{car_class}")
  25. print(f"{car_type} - {budget:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment