home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
989.dms
/
989.adf
/
Education
/
Multidrill
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1990-04-30
|
2KB
|
91 lines
'Multiplication drill
'Scott Wilcox
'HC64 Box 213
'Rimrock, AZ 86335
'voice parameters
CLS: CLEAR, 25000
ON BREAK GOSUB ender: BREAK ON
FOR j=0 TO 8: READ s%(j):NEXT j
DATA 100,0,150,0,23000,64,10,1,0
PRINT "Multiplication drill"
PRINT "by Scott Wilcox"
PRINT " Rimrock, AZ"
RANDOMIZE TIMER :PRINT
a$="Hello. Whats your name?":GOSUB talk
INPUT "Name please";n$ :PRINT
a$="Hi "+n$+". Make your choice.":GOSUB talk
PRINT a$ :PRINT
start:
PRINT "Pick a number to drill, or choose <0> for random, <1> to quit."
INPUT ;a
IF a=1 THEN a$="o k "+n$+". by bye":SAY TRANSLATE$(a$):SYSTEM
a$="o k "+n$+", lets multipli?":GOSUB talk:y=TIMER:g=0
prob:
FOR x=1 TO 10
IF a=0 THEN b=INT(RND*12+1) :ELSE b=a
c=INT(RND*12+1)
e=0
again:
PRINT
PRINT " " b
PRINT "x";c
PRINT "----"
d=b*c
INPUT ;f
PRINT
IF f=d THEN GOSUB right
IF f<>d THEN GOSUB wrong
NEXT x:z=TIMER:GOSUB tim
a$="choose again,"+n$+"":GOSUB talk: GOTO start
right:
a$(1)="very good?"
a$(2)="keep it up?"
a$(3)="excellent?"
a$(4)="wonderful?"
a$(5)="hot dog?"
a$(6)="right on?"
a$(7)="far out?"
a$(8)="awsome?"
a$(9)="good job?"
a$(10)="you got it?"
l%=INT(RND*10+1)
a$=""+a$(l%)+"":GOSUB talk
RETURN
wrong:
e=e+1
IF e=2 THEN a$="The answer is "+STR$(d)+".":GOSUB talk:PRINT a$:g=g+1:RETURN
a$="try again "+n$+"":GOSUB talk:GOTO again
tim:
PRINT
z%= INT(z-y)
PRINT "Time: ";z%;"seconds."
PRINT
PRINT "You missed"+STR$(g)+".":PRINT
IF z%<45 THEN
a$="your time was very good":GOSUB talk
IF g=0 THEN a$=" and you got them all right?":GOSUB talk:a$="Very good, "+n$+"!":GOSUB talk:PRINT a$:PRINT
END IF
IF z%>45 THEN
a$="your time was a little slow":GOSUB talk
IF g=0 THEN a$="but you got them all right?":GOSUB talk:a$="try to build some speed":GOSUB talk
END IF
IF g>1 THEN a$="but you missed "+STR$(g)+"":GOSUB talk:a$="you need more practiss":GOSUB talk
RETURN
talk:
t$=TRANSLATE$(a$)
SAY t$,s%
RETURN
ender:
SYSTEM