Advertisement
JkSoftware

Day 3 - is else and conditional statements

Nov 5th, 2021
917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. print("Welcome to the rollercoaster!")
  2. height = int(input("What is your height in cm? "))
  3. diff = 120 - height
  4. if height >= 120:
  5.     print("Heres a ticket")
  6. else:
  7.     print(
  8.         f"Sorry you need to grow {diff}cm taller to ride :("
  9.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement