Thursday, January 13, 2011

Times table tutor

graphsize 600,600
fastgraphics
font "arial",20,100
For question = 1 to 10
for x = 1 to 10
for y = 0 to 9
color blue
rect x*45,y*45,40,40
color white
text x*45,y*45,x+y*10
next y
next x
a=int (rand*10+1)
b=int (rand*10+1)
print a+"x"+b
refresh
say "Question"+question
say a+" ,times, "+b+","
while clickb = 0
pause .01
endwhile
answer = int(clickx/45) +10*int(clicky/45)
clickclear
if answer =a*b then
say "Yes, well done"
else
say "No, it is"+a*b
end if
next question

No comments:

Post a Comment