DigitMagazine

If statement in Python 3

Aug 25th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. thisyear=2018
  2. birthyear=int(input('Enter your year of birth: '))
  3. if thisyear>birthyear:
  4. print(thisyear-birthyear)
  5. elif thisyear<birthyear:
  6. print("Wrong value entered")
  7. else:
  8. print("Welcome to the world kiddo")
Add Comment
Please, Sign In to add comment