arithmetic-operators.py

print(10 + 20)                  # 30
print(20 - 10)                  # 10
print(10 * 20)                  # 200
print(20 / 10)                  # 2

# power
print(10 ** 2)
# 100

# floating point conversion
print(10.0 + (10 + 20))         # 40.0
print(20.0 - (10 + 10))         # 0.0
print(10.0 * (10 * 2))          # 200.0

# common division error
print(30 / 20)                  # 1
print(30.0 / 20.0)              # 1.5

# integer divison, quotient
print(20.0 // 20.0)             # 1.0
print(30.0 // 20.0)             # 1.0
print(40.0 // 20.0)             # 2.0

# modulo, remainder
print(12.5 % 10.0)              # 2.5
print(10.0 % 20.0)              # 10.0

# built-ins
print(abs(-20))                 # 20
print(sum([1, 2, 3, 4]))        # 10
print(min(1, 2, 3, 4))          # 1
print(max(1, 2, 3, 4))          # 4

# rounding values
print(round(2.945))             # 3.0
print(round(2.495))             # 2.0
print(round(2.945, 2))          # 2.94