Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

anybode send the python code for simple calculator app

0 votes
asked Sep 7, 2018 by pavan (120 points) 1 flag

2 Answers

0 votes
answered Sep 19, 2018 by yethisha (140 points)
while true:

print("options:")

print("enter 'add'to add two numbers")

print("enter 'subtract'to subtract two numbers")

print("enter'multiply'to multiply two numbers")

print("enter'divide'to divide two numbers")

print("enter 'quit'to end")

userinput=="quit":

break;

elif userinput=="add":

num1=float(input("enter a number:"))

num2=float(input("enter another number:"))

result=str(num1+num2)

print("the answer is "+result)

elif userinput=="subtract":

num1=float(input("enter a number:"))

num2=float(input("enter another number:"))

result=str(num1-num2)

print("the answer is "-result)

elif userinput=="multiply":

num1=float(input("enter a number:"))

num2=float(input("enter another number:"))

result=str(num1*num2)

print("the answer is "*result)

elif userinput=="divide":

num1=float(input("enter a number:"))

num2=float(input("enter another number:"))

result=str(num1/num2)

print("the answer is "/result)

else:

print("unknown input")
0 votes
answered Nov 28, 2018 by anonymous
import math as m

expr = (input("Enter Expression: "))
x = eval(expr)
print(x)
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...