fork(1) download
  1. age = input("Enter your age: ")
  2.  
  3. prices = ['free', 10, 15]
  4.  
  5. while True:
  6. if age == '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]}.')
Runtime error #stdin #stdout #stderr 0.12s 23672KB
stdin
Standard input is empty
stdout
Enter your age: 
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
EOFError: EOF when reading a line