Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Created November 2, 2019 01:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sojohnnysaid/2a2476d8f4f4e77943874898e738d145 to your computer and use it in GitHub Desktop.
Save sojohnnysaid/2a2476d8f4f4e77943874898e738d145 to your computer and use it in GitHub Desktop.
python logic getting started
from cs50 import get_int
# get input from the user
x = get_int("x: ")
y = 42
if x < y:
print("x is less than y")
elif x > y:
print("x is greater than y")
else:
print ("x is equal to y")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment