Mathematical Operators


<expression> <operator> <expression>

Addition

a = 5
b = 7
c = a + b
print(c)

displays

12

Subtraction

x = 24
y = 10
z = x - y
print(z)

displays

14

Multiplication

a = 6
b = 7
c = a * b
print(c)

displays

42

Division (Whole Number)

x = 27
y = 3
z = x / y
print(z)

displays

9.0

Division (Decimal)

a = 19
b = 5
c = a / b
print(c)

displays

3.8