simeonshopov

Cruise Ship (late july exam)

Nov 5th, 2019
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.70 KB | None | 0 0
  1. type = input()
  2. cabin = input()
  3. nights = int(input())
  4.  
  5. if type == "Mediterranean":
  6.   if cabin == "standard cabin":
  7.     total = nights * 4 * 27.50
  8.     if nights > 7:
  9.       total *= 0.75
  10.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  11.   elif cabin == "cabin with balcony":
  12.     total = nights * 4 * 30.20
  13.     if nights > 7:
  14.       total *= 0.75
  15.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  16.   elif cabin == "apartment":
  17.     total = nights * 4 * 40.50
  18.     if nights > 7:
  19.       total *= 0.75
  20.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  21. elif type == "Adriatic":
  22.   if cabin == "standard cabin":
  23.     total = nights * 4 * 22.99
  24.     if nights > 7:
  25.       total *= 0.75
  26.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  27.   elif cabin == "cabin with balcony":
  28.     total = nights * 4 * 25.00
  29.     if nights > 7:
  30.       total *= 0.75
  31.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  32.   elif cabin == "apartment":
  33.     total = nights * 4 * 34.99
  34.     if nights > 7:
  35.       total *= 0.75
  36.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  37. elif type == "Aegean":
  38.   if cabin == "standard cabin":
  39.     total = nights * 4 * 23.00
  40.     if nights > 7:
  41.       total *= 0.75
  42.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  43.   elif cabin == "cabin with balcony":
  44.     total = nights * 4 * 26.60
  45.     if nights > 7:
  46.       total *= 0.75
  47.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
  48.   elif cabin == "apartment":
  49.     total = nights * 4 * 39.80
  50.     if nights > 7:
  51.       total *= 0.75
  52.     print(f"Annie's holiday in the {type} sea costs {total:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment