Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Create campname procedure to print the camp name
- def holiday_camp ():
- print("Tane's School Holiday Camp")
- #Print the camp name at the start
- holiday_camp()
- camp_activities = ["Cultural immersion - Easy - $800 - 5 days",
- "Kayaking and pancakes - Moderate - $400 - 3 days",
- "Mountain biking - Difficult - $900 - 4 days"]
- activity_number = 0
- while activity_number < 3 :
- print(activity_number, camp_activities[activity_number])
- activity_number = activity_number + 1
- #Ask name and make sure it is not left blank
- name = ""
- while name == "":
- name = input("What is your name? ")
- if name == "":
- print("Please enter your name - You cannot leave it blank.")
- print("")
- #Ask age and make sure it is not older than a camper can be
- age = 99
- while age < 5 or age > 17 :
- if age != 99:
- print("")
- print("Your age must be between 5 and 17 to attend the camp. Please enter a valid age")
- age = int(input("How old are you? "))
- #Check if age is between 12 and 16 to ask leader question
- while age > 12 and age < 16:
- leader_question = input("You are eligible to be the camp leader. Do you want to be the camp leader? ").lower()
- if leader_question == "yes" or leader_question == "y":
- print("You are now the camp leader.")
- break
- elif leader_question == "no" or leader_question == "n":
- print("Someone else will be chosen to be the camp leader.")
- break
- else:
- print("Sorry, i was looking for a yes/y or no/n answer.")
- #Ask what activity to attend
- activity_number = input("What camp number to do want to attend? ")
- if activity_number == "0":
- print("You have chosen to attend the Cultural Immersion camp.")
- elif activity_number == "1":
- print("You have chosen to attend the Kayaking and Pancakes camp.")
- elif activity_number == "2":
- print("You have chosen to attend the Mountain Biking camp.")
- else:
- print("You must choose to attend a camp - you cannot leave this blank")
- #Ask what meal to eat at the camp
- camp_meal = input("What meal selection would you like? Standard, vegeterian or vegan ")
- if camp_meal == "Standard" or camp_meal == "standard":
- print("You will eat the standard meals at your camp")
- elif camp_meal == "Vegeterian" or "vegeterian":
- print("You will eat the vegeterian meals at your camp")
- elif camp_meal == "Vegan" or "vegan":
- print("You will eat the vegan meals at your camp")
- else:
- print("You must choose a meal to eat while attending your camp - you cannot leave this blank ")
- shuttle_bus = input("Do you need to take the shuttle bus to your camp? - extra $80 ")
- if shuttle_bus == "yes" or shuttle_bus == "y":
- print("You will take the next shuttle bus to your camp")
- elif shuttle_bus == "no" or shuttle_bus == "n":
- print("The next shuttle bus will leave without you")
- else:
- print("You must decide - you cannot leave this blank")
- print(f"hello {name} you are {age} and you have chosen {activity_number}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement