Write a Python program to accept 2 operands from the user and perform the
computation of all the arithmetic operators and display the results with a message.
Share
Write a Python program to accept 2 operands from the user and perform the
computation of all the arithmetic operators and display the results with a message.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
a = int(input("Enter the first number:"))
b = int(input("Enter the second number:"))
print("After performing addition on",a,"and",b,"=",(a+b))
print("After performing multiplication on",a,"and",b,"=",(a*b))
print("After performing division on",a,"and",b,"=",(a/b))
print("After performing modulus operation on",a,"and",b,"=",(a%b))
print("After performing subtraction on",a,"and",b,"=",(a-b))
Explanation: