Quick actions

cmd+k|ctrl+k

Navigation

Languages

Boolean Algebra

Snippet info

Language

Python

Visibility

public

Author

masterhun

Created

2025-09-05T15:23:26.436758Z

Updated

2025-09-05T15:23:26.436758Z

print("Python and Boolean Algebra")

# Boolean variables
x = True
y = False 

print(x)
print(y)
print(not x)
print(not(not x))

# Output: 
# True 
# False 
# False
# True 

print()

print(x and y)
print(x or y)

# Output: 
# False 
# True
INFO