playerans = int(input(""))
The "int" keyword is important, because otherwise, the program will read the player's answer as string. And as you can tell, you can't add 2 numbers in string together, because the result would be stupid. The "int" keyword transforms the string to an integer.
And if you use
print(f"What is {str(question)} * {str(question2)} ?")
instead of print("What is", question, "*", question2, "?"); would make your code more readable. This was just a small thing.
You see, back to the playerans = int(input("")) the "int" keyword is not for only transform string to integer in your code. In your code, the "int" keyword makes your if statement work. You typed:
if playerans == answer:
Here, you are comparing strings to integers, which is illegal in every programming language. That's why you have to transform your string to an integer.
It might've been a little too long, but look, I tried to explain everything. Good luck on your coding journey! :D