ということでかけ算ゲームを作ってみました。それで、ちょっとうまくいきますが、正しい答えを入力すると、「間違った」と2回入力されます...間違った答えを入力した場合と同様です。
import sys #imports sys
random1=['1','2','3','4','5','6','7','8','9','10','11','12'] #makes a list with numbers 1-12
random2=['1','2','3','4','5','6','7','8','9','10','11','12'] #makes another list with numbers 1-12
from random import choice #gets a random number
while True: #makes the following code run in a loop
print "To exit this game type 'exit'" #prints stuff
theyputinstuffhere = raw_input("What is " + choice(random2) + " times " + choice(random1) + "? ") #asks the user things like 1*5 or some other random stuff.
if theyputinstuffhere == "exit": #if the user typed in 'exit' then exit the game
print "Now exiting game!" #prints stuff
sys.exit() #exits
elif theyputinstuffhere == int(choice(random2))*int(choice(random1)): #if what i typed is right, print stuff (I think i messed up here!)
print "Correct!" #print stuff
else:
print "Wrong!" #otherwise print stuff
何を間違えたのかわかりません HELP!!!!!!!!!!!!! 素早い!!!!!!!!!!!!!!!!!