Created
March 25, 2018 02:02
-
-
Save jennyonjourney/ccff1eab6669c20743a6bd3be8e03951 to your computer and use it in GitHub Desktop.
Python basic - calculation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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