1
I intend to make a program in Python (2.7.14) that generates two numbers randomly (from 0 to 10), multiply them, ask the result for the user, and display whether the result is correct or wrong, until typed the string "end", my code went like this:
    import random
    m = 0
    while m!="fim" :
        n1=int(random.random()*10)
        n2=int(random.random()*10)
        m = raw_input("{} * {} = ".format(n1,n2))  
        mult = int(n1*n2)
        if m==mult :
            print "correto!"
        else :
            print "errado!!"
However, whenever I type something, the program always prints "wrong!!", What is the error in my code? Is it well written? Is it possible to optimize it more? If yes , as?