Four-Processor Calculator

in python •  6 years ago 

print "+ ---> collection"
print "- ---> sticker"
print "* ---> impact"
print "/ ---> chamber"

while (True):
op = raw_input ("choose action:")
if (op == "+"):
op1=input("enter first number:")
op2=input("enter second count:")
print op1+op2
elif (op == "-"):
op1=input("enter first number:")
op2=input("enter second count:")
print op1-op2
elif (op == ""):
op1=input("enter first number:")
op2=input("enter second number:")
print op1
op2
elif (op == "/"):
op1=input("enter first number:")
op2=input("enter second number:")
if (op2== 0):
print "A number can not be divided by 0."
else:
print"op1/op2"
else:
print "indeterminate operation!"

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!