Advertisement
KaySawbridge

Till system with no of tickets

Aug 2nd, 2020
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.94 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.     no_of_tickets = int(input("How many tickets would you like? "))
  9.     scard = input("Do you have a swim card? Please answer Yes or No\n")
  10.     if scard == "Yes":
  11.         print ("The cost of your ticket with the 50% swim car discount is £",regswim/2*no_of_tickets)  #50% discount for adults with a swim card
  12.  
  13.     else:
  14.         print ("The cost of your ticket  is £",regswim*no_of_tickets)
  15.  
  16. #if the user is not an adult they must be a teenager or a pensioner so they swim for free
  17. else:
  18.     print ("There is no charge for your ticket")
  19.  
  20. print ("I hope you enjoy your swim today")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement