Advertisement
EmreTopchu

Untitled

Dec 2nd, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.72 KB | None | 0 0
  1. group_budget = int(input())
  2. season = input()
  3. number_of_group_persons = int(input())
  4. ship_price = 0
  5.  
  6. if season == 'Spring':
  7.     ship_price = 3000
  8.     if number_of_group_persons <= 6:
  9.         ship_price -= ship_price * 0.1
  10.     elif 7 <= number_of_group_persons <= 11:
  11.         ship_price -= ship_price * 0.15
  12.     elif number_of_group_persons >= 12:
  13.         ship_price -= ship_price * 0.25
  14.         if number_of_group_persons % 2 == 0:
  15.             ship_price -= ship_price * 0.05
  16.  
  17. elif season == 'Summer':
  18.     ship_price = 4200
  19.     if number_of_group_persons <= 6:
  20.         ship_price -= ship_price * 0.1
  21.     elif 7 <= number_of_group_persons <= 11:
  22.         ship_price -= ship_price * 0.15
  23.     elif number_of_group_persons >= 12:
  24.         ship_price -= ship_price * 0.25
  25.         if number_of_group_persons % 2 == 0:
  26.             ship_price -= ship_price * 0.05
  27.  
  28. elif season == 'Autumn':
  29.     ship_price = 4200
  30.     if number_of_group_persons <= 6:
  31.         ship_price -= ship_price * 0.1
  32.     elif 7 <= number_of_group_persons <= 11:
  33.         ship_price -= ship_price * 0.15
  34.     elif number_of_group_persons >= 12:
  35.         ship_price -= ship_price * 0.25
  36.  
  37. elif season == 'Winter':
  38.     ship_price = 2600
  39.     if number_of_group_persons <= 6:
  40.         ship_price -= ship_price * 0.1
  41.     elif 7 <= number_of_group_persons <= 11:
  42.         ship_price -= ship_price * 0.15
  43.     elif number_of_group_persons >= 12:
  44.         ship_price -= ship_price * 0.25
  45.         if number_of_group_persons % 2 == 0:
  46.             ship_price -= ship_price * 0.05
  47.  
  48. if group_budget >= ship_price:
  49.     print(f"Yes! You have {group_budget - ship_price:.2f} leva left.")
  50. else:
  51.     print(f"Not enough money! You need {(ship_price - group_budget):.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement