mercredi 28 septembre 2022

Time table quize [duplicate]

How can I stop users whenever their answer is correct by printing 'welldone'


num1 = randint(2,12)
num2 = randint(2,12)
result = int(num1)*int(num2)
mine = 0
while result != mine:
    mine = print(input('what is ' +str(num1)+ 'x' +str(num2)+ '?'))
    if result == mine:
        print('Welldone')
        break
    else:
        mine= print(input('again'))
print('Welldone')```

thanks



Aucun commentaire:

Enregistrer un commentaire