-3

I can't figure out why it is saying invalid syntax for the word Options in all of my If statements

Options = raw_input("Would you like to Square, Cube, Multiply, or Divide?    ")

If  Options == "Square" or Options == "square":
Square = int(raw_input("What number would you like to Square?    "))
Answer1 = Square ** 2
print "The answer is :%d" %Answer1

if Options == "Cube":
Cube = int(raw_input("What number would you like to Cube    "))
Answer2 = Cube ** 3
print "The answer is :%d" %Answer2

if Options == "Multiply":
Multiply1 = int(raw_input("What is the first number to multiply?    "))
Multiply2 = int(raw_input("What is the second number to multiply?     "))
Answer3 = Multiply1 * Multiply2
 print "The answer is :d%" %Answer3"
2
  • 2
    Reading a basic Python tutorial would be helpful here Commented Aug 2, 2012 at 18:05
  • 1
    The interrupter points to exactly where the error is located. Take advantage of this feature. Commented Aug 2, 2012 at 18:07

1 Answer 1

7

Python is case-sensitive. If needs to be if. Your code also needs to be indented properly.

Sign up to request clarification or add additional context in comments.

3 Comments

Python is also white space sensitive so press tab once under each if.
Thank you very much. I have it properly indented on my version but it was saying i had to do a certain way to post my question so i just changed it.
To post code in a question, copy and paste it from your editor, highlight it, and hit the code formatting button. Don't remove formatting, especially for Python code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.