Advertisement
JkSoftware

Day 3 - Nested if and elif statements

Nov 5th, 2021
882
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. age = int(input("How old are you? "))
  2. height = int(input("What is your height in cm? "))
  3. heightdif = 120 - height
  4.  
  5. if height >= 120:
  6.     if age < 12:
  7.         print("Youth Ticket: $5")
  8.     elif age < 18:
  9.         print("Teen Ticket: $9")        
  10.     elif age >= 65:
  11.         print("Senior Ticket: $5")
  12.     else:
  13.         print("Adult Ticket: $12")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement