Calculator Trouble (Invalid Syntax)

python

#1

I get a invalid syntax error on my variable xInt when I run the code
calc = (input(“Division, Multiplication, Addition, or Subtraction?”)
xInt = input(“What is the first number?”)
x = int(xInt)
yInt = input(“What is the second number?”)
y = int(yInt)
if(calc == Division):
print(x)/y))
else :
if(calc = Multiplication):
print(x*y)
else :
if(calc = Addition):
print(x+y)
else :
if(calc = Subtraction):
print(x-y)
else :


#2

Just saying, this is python.


#3

There are lots of problems with this code, it looks like you have missing parenthesis in a couple places, at least, as well as issues with your usage or understanding of strings. I would suggest you take the code apart line by line and examine just what it is doing and consider how it helps you get to where your going.


#4

I was able to solve my problem.