0

So I have been testing out on a simple multiplying game that I have created. And it seems that the answer variable is the same thing as the question3 because I have printed them out to see the value, but it still classes it as its not equal. I have commented them out so that you know what I've done.

import random

# Variables
number1 = random.randint(0, 12)

number2 = random.randint(0, 12)

answer = number1 * number2

#print(answer)

question = print("What is", number1,"x", number2, "?")

# Game loop
for i in range (1):

    question2 = input()

    question3 = question2

    #print(question2)

    if question3 == answer:

        print("Well done!")

    elif question2 != answer:

        print("Wrong!")
Gulzar
  • 23,452
  • 27
  • 113
  • 201

0 Answers0