Python
Python
num = 3
if num > 0:
print(num, "is a positive
number.")
print("This is always printed.")
num = -1
if num > 0:
print(num, "is a positive
number.")
print("This is also always printed.")
Else-if Statement
num = 3.4
if num > 0:
print("Positive number")
elif num == 0:
print("Zero")
else:
print("Negative number")
Python operators
Arithmetic operators in Python
True if value/variable is
in 5 in x
found in the sequence
x = 'Hello world'
# Output: True
print('H' in x)
# Output: True
print('hello' not in x)