write a program in python to take 2 numbers in variable. calculate their Sum and diffrence and print it with a message.
Answers
Answered by
1
Answer:
a = int(input("Enter 1st number: "))
b = int(input("Enter 2nd number: "))
s = a + b
d = a - b
print ("Sum of", a, "and", b, "is", s)
print ("Difference of", a, "and", b, "is", d)
Explanation:
Attachments:
Answered by
0
n1 = int(input("Enter 1st Number")
n2 = int(input("Enter 1st Number")
print ("Sum = ",n1+n2)
print ("Difference = ",n1-n2)
Similar questions