2.3.1 Arithmetic Operators
Python Programming
Arithmetic operators are used to perform basic mathematical operations such as addition, subtraction, multiplication, division, modulus, exponentiation, and floor division as shown in the following code. The code shows how to use basic arithmetic operations in Python.
python
# Define variables
a= 10
b= 3
# Perform all arithmetic operations on these numeric variables and print results
print(a, "+", b, "=", a + b) # Output: 10+3=13
print(a, "*", b, " = ", a * b) # Output: 10 * 3 = 30
print(a, "/"