Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Till System
- regswim = 5 #the price of an adult swim, easy to change if the price changes
- print ("Welcome to the virtual swimming pool.")
- ticket = input("Please tell me what type of ticket you would like:\nPensioner\nTeenager\nAdult\n") #ask the user for their swim catagory
- #if the user inputs Adult swimmer work out the ticket price
- if ticket == "Adult":
- scard = input("Do you have a swim card? Please answer Yes or No\n")
- if scard == "Yes":
- print ("The cost of your ticket with the 50% swim car discount is £",regswim/2) #50% discount for adults with a swim card
- else:
- print ("The cost of your ticket is £",regswim)
- #if the user is not an adult they must be a teenager or a pensioner so they swim for free
- else:
- print ("There is no charge for your ticket")
- print ("I hope you enjoy your swim today")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement