Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jennyonjourney/ccff1eab6669c20743a6bd3be8e03951 to your computer and use it in GitHub Desktop.
Save jennyonjourney/ccff1eab6669c20743a6bd3be8e03951 to your computer and use it in GitHub Desktop.
Python basic - calculation
x=17
y=7
print(x+y)
print(x-y)
print(x/y)
print(x**y)
print(x//y)
print(x%y)
print(1==3)
x=17
y=7
print(x > y)
print(x >= y)
x = '장동건'
y = '배용준'
print(x*3)
x = True; y = True
print(x and y)
print(x or y)
print(not x)
#0은 항상 False이고, 0외의 숫자는 True이다.
x = 0; y = 1234
print(x and y)
print(x or y)
print(not x)
x = ''; y = '문자 문자'
print(x and y)
print(x or y)
print(not x)
age = 28
dress = 'Casual'
print("And 클럽:", agechk and dresschk)
print("Or 클럽:", agechk or dresschk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment