Advertisement
scipiguy

Logical Expressions and Python

Oct 28th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. vegetarian = input('Do you eat meat? [Y/N] ')
  2. vegan = input('Do you eat any other animal products [Y/N]? ')
  3. if (vegetarian =='Y') or (vegan =='Y'):
  4.         fly = input('Do you fly in a plane often [Y/N]? ')
  5.         if not(fly == 'Y'):
  6.             print ('You really care about your carbon footprint :-)')
  7. print ('Have a great day')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement