Created
March 1, 2018 15:02
-
-
Save enseitankad0/a0b9b3b1038216170e333a854f85783d to your computer and use it in GitHub Desktop.
This file contains 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
##### LOGICAL OPERATORS ###### | |
## the same as in Java | |
## < > <= => | == | |
#1 not highest priority | |
#2 and | |
#3 or lowest priority | |
a = True | |
b = False | |
print(not a) #is [a] a false? NO | |
print(not b) #is [b] a false? YES | |
print(a and b) #logical: t+f=f | |
print(a or b) #logical: t+f=t | |
a = 1 | |
b = 5 | |
c = 'KAMIL' | |
d = 'MAGDALENA' | |
f = False | |
print(not(not(a>b) or f) and a ) #false | |
print(not(not(a>b) or f) or a ) #1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment