fork download
  1. prices = ['free', 10, 15]
  2.  
  3. while True:
  4. age = input("Enter your age: ")
  5.  
  6. if age.lower() == 'quit':
  7. break
  8.  
  9. age = int(age)
  10.  
  11. if age < 3:
  12. print(f'Your movie ticket is {prices[0]}.')
  13. elif age < 12:
  14. print(f'Your movie ticket costs ${prices[1]}.')
  15. else:
  16. print(f'Your movie ticket costs ${prices[2]}.')
Success #stdin #stdout 0.02s 9296KB
stdin
14
QUIT
stdout
Enter your age: Your movie ticket costs $15.
Enter your age: