Magic 8 Ball python syntax error help

#Syntax error on line 11 and need help

[/codebyte]
import random

name = “”

question = “Yes” or “No”

answer = “”

random_number = random.randint(1, 9)

#print(random_number)

if (random_number == 1):

answer = (“Yes definitely.”)

print(answer)

elif (random_number == 2):

 answer = ("It is decidedly so")

 print(answer)

 elif (random_number == 3):

   answer("Without a doubt.")

   print(answer)

   elif (random_number == 4):

     answer = ("Reply hazy, try again.")

     print(answer)

     elif (random_number == 5):

       answer = ("Ask again later.")

       print(answer)

       elif (random_number == 6):

         answer = ("Better not tell you now.")

         print(answer)

         elif (random_number == 7):

           answer = ("My sources say no.")

           print(answer)

           elif (random_number == 8):

           answer = ("Outlook not so good.")

           print(answer)

           elif (random_number == 9):

             answer = ("Very Doubtful.")

             print(answer)

             else:

               answer = "Error"

answer is not a function (non-callable).

What is this line supposed to mean. question will be True.

Aside

When text is already delimited by quotes, we don’t need to wrap it in parens.

answer =  "Without a doubt."
import random name = "" question = "Yes" or "No" answer = "" random_number = random.randint(1, 9) #print(random_number) if (random_number == 1): answer = "Yes definitely." print(answer) elif (random_number == 2): answer = "It is decidedly so" print(answer) elif (random_number == 3): answer = "Without a doubt." print(answer) elif (random_number == 4): answer = "Reply hazy, try again." print(answer) elif (random_number == 5): answer = "Ask again later." print(answer) elif (random_number == 6): answer = "Better not tell you now." print(answer) elif (random_number == 7): answer = "My sources say no." print(answer) elif (random_number == 8): answer = "Outlook not so good." print(answer) elif (random_number == 9): answer = "Very Doubtful." print(answer) else: answer = "Error"

Okay I fixed that part thank you, but I still get an error?

All your elifs are over indented. They should all line up with the if.

Remember to fix your question, too. It should not be logical expression which is what it is at present.

question = "Yes, or, No?"