Computer Science, asked by deepanshuk015, 17 days ago

Write a python program to calculate to input two values from user and use all arithmetic operator .(add, subtract, exponent ect)​

Answers

Answered by r27272278
0

# Python program to perform Addition Subtraction Multiplication

# and Division of two numbers

num1 = int(input("Enter First Number: "))

num2 = int(input("Enter Second Number: "))

print("Enter which operation would you like to perform?")

ch = input("Enter any of these char for specific operation +,-,*,/: ")

result = 0

if ch == '+':

result = num1 + num2

elif ch == '-':

result = num1 - num2

elif ch == '*':

result = num1 * num2

elif ch == '/':

result = num1 / num2

else:

print("Input character is not recognized!")

print(num1, ch , num2, ":", result)

i hope it helpful to you

Similar questions