Answers for "how to make a calculator in python 8 digits"

8

calculator code

x = input("first number")
y = input("second number")
z = input("do you want to multiply, minus, divide or add? (x,-,/,+)")

y = int(y)
x = int(x)

if z == "+":
    print (x + y)

if z == "/":
    print (x / y)

if z == "x":
    print (x * y)

if z == "-":
    print (x - y)

else:
    print("use x,-,/ or + next time!")
Posted by: Guest on June-04-2020

Code answers related to "how to make a calculator in python 8 digits"

Browse Popular Code Answers by Language