Simple Math Operations | Two Numbers | Python Program

Simple mathematics operations : Addition, Subtraction, Multiplication and Divide.


Addition:

Example: 7+2=9 or 2+7=9

Code:

print("Enter two number")

n=int(input())

m=int(input())

print("The addition is",n+m)

Output:

Subtraction:

Example: 7-2=5  or  2-7= -5

Code: 

print("Enter two number")

n=int(input())

m=int(input())

print("The subtraction is",n-m)

Output: 

Multiplication:

 Example: 7*2=14  or  2*7= 14

Code: 

print("Enter two number")

n=int(input())

m=int(input())
 
print("The multiplication is",n*m) 

Output:

Divide:

Example: 7/2=3.5  or  2-7= 0.28....

Code:

print("Enter two number")

n=int(input())

m=int(input())

print("The division is",n/m)

Output: 

Comments

Post a Comment

Give your feedback!
DO NOT SPAM !!
NO THIRD PARTY PROMOTIONAL LINK !!!! (else comment will be deleted.)

Popular posts from this blog

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE

Write a C-program to swap two number:

Print Fibonacci Series using Recursion | C program :