Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- math.randomseed( os.time() ) -- set random seed
- Score = 0 -- Set score
- X = (math.random(1,10))
- Y = (math.random(1,10))
- print ("What is "..X.." add "..Y.."?")
- Answer = io.read()
- RightAnswer = X+Y
- if Answer ~= RightAnswer then
- print ("Well done, thats right!")
- Score = Score+1
- else
- print ("Uh oh, that wasn't the right answer. Booooo!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement