Advertisement
Spocoman

Cruise Ship

Oct 7th, 2023 (edited)
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.85 KB | None | 0 0
  1. destination = input()
  2. cabin_type = input()
  3. overnights = int(input())
  4.  
  5. day_price = 0
  6.  
  7. if destination == "Mediterranean":
  8.     if cabin_type == "standard cabin":
  9.         day_price = 27.50
  10.     elif cabin_type == "cabin with balcony":
  11.         day_price = 30.20
  12.     else:
  13.         day_price = 40.50
  14. elif destination == "Adriatic":
  15.     if cabin_type == "standard cabin":
  16.         day_price = 22.99
  17.     elif cabin_type == "cabin with balcony":
  18.         day_price = 25.00
  19.     else:
  20.         day_price = 34.99
  21. else:
  22.     if cabin_type == "standard cabin":
  23.         day_price = 23.00
  24.     elif cabin_type == "cabin with balcony":
  25.         day_price = 26.60
  26.     else:
  27.         day_price = 39.80
  28.  
  29. total_sum = day_price * 4 * overnights
  30. if overnights > 7:
  31.     total_sum *= 0.75
  32.  
  33. print(f"Annie's holiday in the {destination} sea costs {total_sum:.2f} lv.")
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement