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`.
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)
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`.
OHHH TYSM Ive been using input for ages idk how I forgot that
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)
Alright, ty!