I want to create a simple program which asks user the square of random number, and if the user inputs correct answer then it will show 'Good". But as you can see here, it is showing 'Error'. Why?
My code:
import random
a = random.randint(2, 10)
print(a)
b = a * a
print(b)
num = input("Enter answer\n")
if num == b:
print("Good")
else:
print("Error")