Advertisement
7f

test2

7f
Jun 18th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. print("Tane's School Holiday Camp")
  2.  
  3. #Print the camp name at the start
  4. holiday_camp()
  5.  
  6. camp_activities = ["Cultural immersion - Easy - $800 - 5 days",
  7. "Kayaking and pancakes - Moderate - $400 - 3 days",
  8. "Mountain biking - Difficult - $900 - 4 days"]
  9.  
  10. activity_number = 0
  11. while activity_number < 3 :
  12. print(activity_number, camp_activities[activity_number])
  13. activity_number = activity_number + 1
  14.  
  15. #Ask name and make sure it is not left blank
  16. name = ""
  17. while name == "":
  18. name = input("What is your name? ")
  19. if name == "":
  20. print("Please enter your name - You cannot leave it blank.")
  21. print("")
  22.  
  23. #Ask age and make sure it is not older than a camper can be
  24. age = 99
  25. while age < 5 or age > 17 :
  26. if age != 99:
  27. print("")
  28. print("Your age must be between 5 and 17 to attend the camp. Please enter a valid age")
  29. age = int(input("How old are you? "))
  30.  
  31. leader_question = input("You are eligible to be the camp leader. Do you want to be the camp leader? ").lower()
  32. if leader_question == "yes" or leader_question == "y":
  33. print("You are now the camp leader.")
  34. elif leader_question == "no" or leader_question == "n":
  35. print("Someone else will be chosen to be the camp leader")
  36. else:
  37. print("Answer with yes/y or no/n please")
  38.  
  39.  
  40.  
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement