Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Created November 2, 2019 01:38
Show Gist options
  • Save sojohnnysaid/0bd30a3828073bcf3ddfed045eb58677 to your computer and use it in GitHub Desktop.
Save sojohnnysaid/0bd30a3828073bcf3ddfed045eb58677 to your computer and use it in GitHub Desktop.
Python logic operators
from cs50 import get_string
c = get_string("enter Y or N if this is fun: ")
if c == "Y" or c == "y":
print("glad you are having fun")
if c == "N" or c == "n":
print("it gets better...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment