I tend to wonder whether educationists do not perhaps sometimes get too carried away in there enthusiasm to use computers to help the young, by making their programs far too elaborate. This is a very simple program to encourage the very young to learn to add. It can be run at two levels. In the very simple single figure level the child can count the CHR$(174)s to find the answer.
Those wishing to improve on the program might like to use LOADBMP to insert images say of animals to attract a child’s interest.
' Simple Arithmetic Tutor
nomainwin : DIM F(5): S$ = CHR$(174)
UpperLeftX = 200 : UpperLeftY = 200
WindowWidth = 400 : WindowHeight = 400
button #s, "Simple Sums", [sums], LL 60, 50
button #s, "*** Quit ***", [quit], LL, 230, 50
open "Arithmetic Tests" for graphics_nsb as #s
#s "discard; trapclose [quit]; color green; goto 40 100"
#s "fill 30 1 10; backcolor 40 1 10; font arial 14 bold"
#s "\Arithmetic Tests for the very young"
#s "color white; font 10; goto 90 140"
#s "\JB Ver by Gordon Sweet - April 2005"
sp$ = space$(10) : wait
[sums]
close #s : open "Simple Sums" for text as #s
[sstart]
#s "!trapclose [quit]" : #s "!font arial 12 bold"
[3140]
confirm "Double Figures?"; K$
TWO = 0
IF K$ = "yes" THEN TWO = 1 : FIN = 0
N = 1: OK = 0: MF = 8 : MT = 9
IF TWO = 1 THEN MF = 98: MT = 99
WHILE FIN = 0
A = 999: B = 999
WHILE A + B > MT
A = INT(RND(1) * MF) + 1
B = INT(RND(1) * MF) + 1
S = A + B
IF TWO = 1 AND S < 10 THEN A = 999
WEND
#s "SIMPLE SUMS.\TEST";N; " CORRECT ";OK
U=A : #s sp$ ;USING("###", U)
U=B : #s sp$;USING("###", U)
#s sp$;"------" : sa$=""
for p=1 to A : sa$=sa$+S$ : next p
sb$=""
for p=1 to B : sb$=sb$+S$ : next p
IF TWO = 0 THEN #s sp$;sa$ : #s sp$;sb$
A$="" : prompt "Enter the SUM of these"; A$
G = val(A$) : #s sp$;USING("###", G)
IF G <> S THEN #s sp$;"WRONG": playwave "chord"
IF G = S THEN #s sp$;"CORRECT":playwave "tada" : OK = OK + 1
confirm "Another Test Y/N?"; K$
IF K$ = "no" THEN FIN = 1
N = N + 1
WEND
#s "** Use the scrollbar to review all tests **" : wait
[quit]
close #s : end