Advertisement
Nenogzar

Untitled

Sep 20th, 2023
850
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.80 KB | None | 0 0
  1. season = input()                    # Сезонът – текст - “Winter”, “Spring” или “Summer”;
  2. group_type = input()                # Видът на групата – текст - “boys”, “girls” или “mixed”;
  3. student_number = int(input())       # Брой на учениците – цяло число в интервала [1 … 10000];
  4. nights_number = int(input())        # Брой на нощувките – цяло число в интервала [1 … 100].
  5. discount = 1
  6. sports = ""
  7. night_price = 0
  8.  
  9. if season == "Winter":
  10.     if group_type == "boys":
  11.         night_price = 9.60
  12.         sports = "Judo"
  13.     elif group_type == "girls":
  14.         night_price = 9.60
  15.         sports = "Gymnastics"
  16.     elif group_type == "mixed":
  17.         night_price = 10
  18.         sports = "Ski"
  19.     else:
  20.         print('error')
  21. elif season == "Spring":
  22.     if group_type == "boys":
  23.         night_price = 7.20
  24.         sports = "Tennis"
  25.     elif group_type == "girls":
  26.         night_price = 7.20
  27.         sports = "Athletics"
  28.     elif group_type == "mixed":
  29.         night_price = 9.5
  30.         sports = "Cycling"
  31.     else:
  32.         print('error')
  33. elif season == "Summer":
  34.     if group_type == "boys":
  35.         night_price = 15
  36.         sports = "Football"
  37.     elif group_type == "girls":
  38.         night_price = 15
  39.         sports = "Volleyball"
  40.     elif group_type == "mixed":
  41.         night_price = 20
  42.         sports = "Swimming"
  43.     else:
  44.         print('error')
  45. else:
  46.     print('error')
  47.  
  48.  
  49.  
  50. if 10 <= student_number < 20:
  51.     discount = 0.95
  52. elif 20 <= student_number < 50:
  53.     discount = 0.85
  54. elif student_number > 50:
  55.     discount = 0.5
  56.  
  57.  
  58. price = (student_number * nights_number) * night_price
  59. price_discount = price * discount
  60. print(f"{sports} {price_discount:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement