MY maths quiz was working but now. It says after 'if ops =='+':' that the colon is an invalid syntax. Please can you help me fix it. If I remove the colon below it the answer variable would come up as an invalid syntax error.
import random
question=0
userInput = int()
LastName = str()
answer = str()
FirstName = str()
Form = str()
def Quiz():
score=0
LastName = input ("Please enter your surname: ").title()
FirstName = input ("Please enter your first name: ").title()
Form = input ("Please enter your form: ").title()
for i in range(10):
print ("What is:")
num1= random.randint(1,12)
num2= random.randint(1,12)
ops = ['+', '-', '*']
operation = random.choice(ops)
Q = int(input(str(num1)+operation+str(num2)
if ops =='+':
answer==num1+num2
if Q == answer:
print ("correct")
score= score+1
else:
print('You Fail')
elif ops =='-':
answer==num1-num2
if Q == answer:
print ("correct")
score= score+1
else:
print("you fail")
else:
answer==num1*num2
if Q == answer:
print ("correct")
score= score+1
else:
print("you fail")