Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Start
- n = 0
- p = 10
- while not (n >= 1 and n < 26):
- n = input("How many tickets? ")
- n = int(n)
- if not (n >= 1 and n < 26):
- print("Number must between 1 to 25!, Pls try again!")
- if n < 10:
- d = 0
- elif n >= 10 and n < 20:
- d = 0.1
- else:
- d = 0.2
- cost = n * (1 - d) * p
- print(f"Total cost for {n} tickets is {cost}")
- # End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement