home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
989.dms
/
989.adf
/
Education
/
Spellquiz
(
.txt
)
< prev
next >
Wrap
AmigaBASIC Source Code
|
1990-04-30
|
3KB
|
104 lines
'Spelling Quiz. rev. 10-15-86,10-22-86
'Scott Wilcox
'HC 64 Box 213
'Rimrock, AZ 86335
'voice parameters
CLS: CLEAR, 25000
ON BREAK GOSUB quit: BREAK ON
FOR j=0 TO 8: READ s%(j):NEXT j
DATA 100,0,150,0,23000,64,10,1,0
PRINT "Spelling Quiz"
PRINT "By Scott Wilcox"
PRINT "Rimrock, AZ":PRINT:RANDOMIZE TIMER
a$="Hello, whats your name?":GOSUB talk
INPUT"Name please";n$
a$="Hi "+n$+". Type in your words. ":GOSUB talk:n=1
PRINT "Type <return> to stop. ":GOTO words
start:
CLS:PRINT" Add New Words: 1"
PRINT" Review: 2"
INPUT"Enter choice 1 or 2";c
IF c=1 THEN:PRINT:n=1:PRINT "Type in ten new words. Type <return> to stop. ": GOSUB words
go:
CLS
a$="o.k,"+n$+". Lets spell.":GOSUB talk
a$="I may say some of the words funny, so lissen carefully.":GOSUB talk
PRINT"Enter <q> to quit"
PRINT" <c> for the correct spelling"
LOCATE 3,4:PRINT "Words"
LOCATE 4,4 :PRINT "Missed:"
a=0:y=TIMER:e=0
spell:
a=a+1:t=0
again:
IF a>10 THEN GOTO congrats
IF b$(a)="" THEN GOTO congrats
a$="Please type. "+b$(a)+".":GOSUB talk
LOCATE 18,10:PRINT " "
LOCATE 18,10:INPUT; a$
IF a$="q" THEN GOTO quit
IF a$="c" THEN
LOCATE (4+e),14
PRINT b$(a):e=e+1:GOTO spell
END IF
IF a$=b$(a) THEN GOSUB right
IF t>0 THEN GOSUB wrong
IF a$<>b$(a) THEN a$="try again,"+n$+"?":GOSUB talk:t=t+1:GOTO again
wrong:
a$="Sorry. you missed it. Here is how to spell,"+b$(a)+"":GOSUB talk
LOCATE (4+e),14
e=e+1:PRINT b$(a):GOTO spell
right:
a$(1)="very good,"+n$+"?"
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,"+n$+"?"
a$(9)="good job?"
a$(10)="you got it "+n$+"?"
l%=INT(RND*10+1)
a$=""+a$(l%)+"":GOSUB talk:GOTO spell
talk:
SAY TRANSLATE$(a$),s%
RETURN
congrats:
z=TIMER:a$="o.k."+n$+", you are finished":GOSUB talk
IF e=0 THEN
a$="you spelled all the words right. Good work,"+n$+".":GOSUB talk
a$="can you beat your old TIME?" :GOSUB talk
END IF
IF e=1 THEN a$="you only missed won":GOSUB talk
IF e>1 THEN a$="but you missed "+STR$(e)+"":GOSUB talk
z%=INT(z-y):PRINT "time: ";z%;"seconds":a$="":GOSUB talk
PRINT :PRINT "You missed ";e;"."
a$="would you like to spell some more,"+n$+"?":GOSUB talk
INPUT "y/n";z$:IF z$="y" THEN GOTO start :ELSE quit
words:
INPUT"Be sure and spell them correctly! ",b$(n)
a$=b$(n):GOSUB talk
IF b$(n)="" THEN GOTO go
IF n=10 THEN GOTO go
n=n+1:GOTO words
quit:
SAY TRANSLATE$ ("o.k, "+n$+", by Bye?")
SYSTEM