random generated math quiz
Question: i am trying to make a random generated math quiz on python and i keep
encountering a syntax error but i cant find out whats wrong with my code?

    
    
    print ("what is your username")
    name = input () .title()
    print (name, "welcome")
    import random
    score = 0
    random.randint
    ops = ["+", "-", "*"]
    num1 = random.randint (0,10)
    num2 = random.randint (0,10)
    oparator = random.choice=(ops)
    Q=(str(num1)+(ops)+(str(num2))
       print(Q)
    

I keep encountering this error but i have no idea whats wrong with my code?


Answer: Ok, try to replace input with raw_input, and your code has lots of errors.
This code is running well in my computer

    
    
    print ("what is your username")
    name = raw_input()
    print (name, "welcome")
    import random
    score = 0
    random.randint
    ops = ["+", "-", "*"]
    num1 = random.randint (0,10)
    num2 = random.randint (0,10)
    oparator = random.choice(ops)
    Q=(str(num1)+(oparator)+(str(num2)))
    print Q
    

