BbJLeB

07. School Camp

May 12th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.33 KB | None | 0 0
  1. # 07. School Camp
  2. season = input()
  3. groupType = input()
  4. students = int(input())
  5. nightsCount = int(input())
  6. hotelPrice = 0
  7. sport = None
  8. if season == "Spring":
  9.     if groupType == "girls":
  10.         hotelPrice = 7.20
  11.         sport = "Athletics"
  12.     elif groupType == "boys":
  13.         hotelPrice = 7.20
  14.         sport = "Tennis"
  15.     elif groupType == "mixed":
  16.         hotelPrice = 9.50
  17.         sport = "Cycling"
  18. elif season == "Winter":
  19.     if groupType == "girls":
  20.         hotelPrice = 9.60
  21.         sport = "Gymnastics"
  22.     elif groupType == "boys":
  23.         hotelPrice = 9.60
  24.         sport = "Judo"
  25.     elif groupType == "mixed":
  26.         hotelPrice = 10
  27.         sport = "Ski"
  28. elif season == "Summer":
  29.     if groupType == "girls":
  30.         hotelPrice = 15
  31.         sport = "Volleyball"
  32.     elif groupType == "boys":
  33.         hotelPrice = 15
  34.         sport = "Football"
  35.     elif groupType == "mixed":
  36.         hotelPrice = 20
  37.         sport = "Swimming"
  38.  
  39. priceNights = students * hotelPrice * nightsCount
  40. discount = 0;
  41. if students >= 50:
  42.     priceNights /= 2
  43. elif students >= 20 and students < 50:
  44.     discount = priceNights * 0.15
  45.     priceNights = priceNights - discount
  46. elif students >= 10 and students < 20:
  47.     discount = priceNights * 0.05
  48.     priceNights = priceNights - discount
  49. print(f"{sport} {priceNights:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment