Advertisement
KaySawbridge

Till system

Aug 1st, 2020
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. #Till System
  2. regswim = 5  #the price of an adult swim, easy to change if the price changes
  3. print ("Welcome to the virtual swimming pool.")
  4. ticket = input("Please tell me what type of ticket you would like:\nPensioner\nTeenager\nAdult\n") #ask the user for their swim catagory
  5.  
  6. #if the user inputs Adult swimmer work out the ticket price
  7. if ticket == "Adult":
  8.     scard = input("Do you have a swim card? Please answer Yes or No\n")
  9.     if scard == "Yes":
  10.         print ("The cost of your ticket with the 50% swim car discount is £",regswim/2)  #50% discount for adults with a swim card
  11.  
  12.     else:
  13.         print ("The cost of your ticket  is £",regswim)
  14.  
  15. #if the user is not an adult they must be a teenager or a pensioner so they swim for free
  16. else:
  17.     print ("There is no charge for your ticket")
  18.  
  19. print ("I hope you enjoy your swim today")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement