num1=int(input('Enter first number: ')) #you can enter Enter first number
m=(input('Enter method("+,-,*,/"): ')) #you can enter method like ("+,-,*,/")
num2=int(input('Enter second number: '))#you can enter second number
if m == '+':
print('Ans is: ',num1+num2)
elif m== '-':
print('Ans is: ',num1-num2)
elif m== '/':
print('Ans is: ',num1/num2)
elif m== '*':
print('Ans is: ',num1*num2)
copy and in: https://www.onlinegdb.com/online_python_compiler
Comments
Post a Comment