PYTHON_101 | EXAMPLE 4 - OPERATORS.PY
SMARS Learning Platform
100% Complete
PYTHON_101 | EXAMPLE 4 - OPERATORS.PY
Type of the program below into your Python Editor
# Operators
# Python_101
# Set the variable a to the number 1
a = 1
# set the variable b to the floating point number 3.14
b = 3.14
# set c to the sum of a plus b
c = a + b
# set the value of d to the sum of a minus b
d = a - b
# set the value of e to the sum of a multiplied by b
e = a * b
# set the value of a to a + 1
a += 1
# set the value of b to b - 1
b -= 1
Downloads |