# Arithmetic Operations in Python

Like other languages python is also rich set of  operators. The following example demonstrate you how to use various arithmetic operations available in python.

We can also type conversion while using the operands in the operations like other languages.

```# Store input numbers:
a = input('Enter first number: ')
b = input('Enter second number: ')

sum = float(a) + float(b)
# Subtract two numbers
min = float(a) - float(b)
# Multiply two numbers
mul = float(a) * float(b)
#Divide two numbers
div = float(a) / float(b)
# Display the sum
print(sum)

# Display the subtraction
print(min)
# Display the multiplication
print(mul)
# Display the division
print(div)

```

In the above example, the integer types are converted to float to display all results in float purpose .

The result of above program is

```Enter first number: 10
Enter second number: 20
30.0
-10.0
200.0
0.5```

More

More

MFCS
COA
PL-CG
DBMS
OPERATING SYSTEM
SOFTWARE ENG
DSA
TOC-CD
ARTIFICIAL INT

More

More

More

More
Top