Python add two number example

In this Python example, we will see Python add two number example. In this python online tutorial, we see with example that how we can add two numbers in Python programming.

#Python add two number Example

number1=10
number2=12.25

sum=number1+number2

print("Addition of two number is:",sum)

 

Addition of two number is 22.25

 

Explanation

  • number1 is integer number
  • number2 is decimal number
  • addition can be done using plus operator +  in Python.

In python if we use plus + sign between two Strings, they will concatenate as we study in Python Strings concatenation example , and if we apply plus operator between two numbers, numbers will add.

 

 

Please follow and like us:
READ  Python even odd example