python - How to add up two randints -
every time show "wrong". when answer right.
from random import randint rnd1 = [randint(0,9)] rnd2 = [randint(0,9)] print([rnd1] + [rnd2]) res = int(input("result:")) if res == rnd1 + rnd2: print("right") else: print("wrong")
Comments
Post a Comment