Advertisement
Skysong80

Logical Expressions in Programming

Mar 25th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. sunny = input("Is it sunny out today? Y/N ")
  2.  
  3. if sunny == "Y":
  4.     tide = input("Is the tide in? Y/N ")
  5.     if not (tide == "Y"):
  6.         print("Have fun at the beach!")
  7.     else:
  8.         print("Why not enjoy a walk on the prom.")
  9. else:
  10.     print("Looks like you should find a cafe!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement