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

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -