Ddimov90

school_camp_07_03

Oct 2nd, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.39 KB | Source Code | 0 0
  1. season = input()
  2. group_type = input()
  3. students_number = int(input())
  4. nights = int(input())
  5.  
  6. sport = ""
  7. price_per_student = 0
  8.  
  9. if season == "Winter":
  10.     if group_type == "boys" or group_type == "girls":
  11.         price_per_student = 9.6
  12.         if group_type == "boys":
  13.             sport = "Judo"
  14.         elif group_type == "girls":
  15.             sport = "Gymnastics"
  16.  
  17.     elif group_type == "mixed":
  18.         price_per_student = 10
  19.         sport = "Ski"
  20.  
  21. elif season == "Spring":
  22.     if group_type == "boys" or group_type == "girls":
  23.         price_per_student = 7.2
  24.         if group_type == "boys":
  25.             sport = "Tennis"
  26.         elif group_type == "girls":
  27.             sport = "Athletics"
  28.  
  29.     elif group_type == "mixed":
  30.         price_per_student = 9.5
  31.         sport = "Cycling"
  32.  
  33. elif season == "Summer":
  34.     if group_type == "boys" or group_type == "girls":
  35.         price_per_student = 15
  36.         if group_type == "boys":
  37.             sport = "Football"
  38.         elif group_type == "girls":
  39.             sport = "Volleyball"
  40.  
  41.     elif group_type == "mixed":
  42.         price_per_student = 20
  43.         sport = "Swimming"
  44.  
  45. total_price = price_per_student * students_number * nights
  46.  
  47. if students_number >= 50:
  48.     total_price *= 0.5
  49. elif 20 <= students_number:
  50.     total_price *= 0.85
  51. elif 10 <= students_number:
  52.     total_price *= 0.95
  53.  
  54. print(f"{sport} {total_price:.2f} lv.")
  55.  
Advertisement
Add Comment
Please, Sign In to add comment