Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. prompt = "\nPer favore inserisci la tua eta'."
  2. prompt += "\nInserisci 'quit' quando hai finito. "
  3. answer = "Your price is: $"
  4.  
  5. while True:
  6. age = input(prompt)
  7. if age == 'quit':
  8. break
  9. age = int(age)
  10.  
  11. if age < 3:
  12. price = 0
  13. elif age < 13:
  14. price = 10
  15. else:
  16. price = 15
  17. print(f"{answer}{price}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement