Write a Python program to enter two numbers and find their sum.

Write a Python program to enter two numbers and perform all arithmetic operations.

Solution :- 

Static 

a = 10
b = 20
add = a+b
sub = a-b
mul = a*b
div = a/b
div1 = a//b
mod = a%b
print("The sum of 2 number is :- ",add)
print("The sub of 2 number is :- ",sub)
print("The mul of 2 number is :- ",mul)
print("The div of 2 number is :- ",div)
print("The div1 of 2 number is :- ",div1)
print("The mod of 2 number is :- ",mod)

Solution

DYNAMIC

a = int(input("Enter the First number :- "))
b = int(input("Enter the Second number :- "))
c = a+b
print("The sum of 2 number is :- ",c)

Solution

TRY THIS CODE

Leave a Reply

Your email address will not be published. Required fields are marked *

sign up!

We’ll send you the hottest deals straight to your inbox so you’re always in on the best-kept software secrets.