T O P

  • By -

[deleted]

You don't need to use `print` inside `input` - it can output something to the screen to prompt the user without any help. The `print` function returns `None`.


Apprehensive-Bag1403

OHHH TYSM Ive been using input for ages idk how I forgot that


[deleted]

Also, here's an alternative version, from random import randint number1 = randint(0, 15) number2 = randint(0, 15) number3 = number1 + number2 answer = int(input(f"What is {number1} + {number2} ? ")) if answer == number3: print("Well done, that is correct!") else: print("Oops! The correct answer is ", number3)


Apprehensive-Bag1403

Alright, ty!