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 >
AmigaBASIC Source Code  |  1990-04-30  |  3KB  |  104 lines

  1.   'Spelling Quiz.  rev. 10-15-86,10-22-86
  2.   'Scott Wilcox
  3.   'HC 64 Box 213
  4.   'Rimrock, AZ 86335
  5.   'voice parameters
  6. CLS: CLEAR, 25000
  7. ON BREAK GOSUB quit: BREAK ON
  8.   FOR j=0 TO 8: READ s%(j):NEXT j
  9.   DATA 100,0,150,0,23000,64,10,1,0
  10.  
  11.    PRINT "Spelling Quiz"
  12.    PRINT "By Scott Wilcox"
  13.    PRINT "Rimrock, AZ":PRINT:RANDOMIZE TIMER
  14.    a$="Hello, whats your name?":GOSUB talk
  15.    INPUT"Name please";n$
  16.    a$="Hi "+n$+". Type in your words. ":GOSUB talk:n=1
  17.    PRINT "Type <return> to stop. ":GOTO words
  18.   
  19. start:
  20.    CLS:PRINT"  Add New Words: 1"
  21.    PRINT"         Review: 2"
  22.    INPUT"Enter choice 1 or 2";c
  23.    IF c=1 THEN:PRINT:n=1:PRINT "Type in ten new words.  Type <return> to stop. ": GOSUB words
  24.  
  25. go:
  26.    CLS
  27.    a$="o.k,"+n$+".  Lets spell.":GOSUB talk
  28.    a$="I may say some of the words funny, so lissen carefully.":GOSUB talk
  29.    PRINT"Enter <q> to quit"
  30.    PRINT"      <c> for the correct spelling"
  31.    LOCATE 3,4:PRINT "Words"
  32.    LOCATE 4,4 :PRINT "Missed:"
  33.    a=0:y=TIMER:e=0
  34.  
  35. spell:
  36.    a=a+1:t=0
  37.    
  38. again:
  39.    IF a>10 THEN GOTO congrats
  40.    IF b$(a)="" THEN GOTO congrats
  41.    a$="Please type. "+b$(a)+".":GOSUB talk
  42.    LOCATE 18,10:PRINT "                       "
  43.    LOCATE 18,10:INPUT; a$
  44.    IF a$="q" THEN GOTO quit
  45.    IF a$="c" THEN 
  46.       LOCATE (4+e),14
  47.       PRINT  b$(a):e=e+1:GOTO spell
  48.       END IF
  49.    IF a$=b$(a) THEN GOSUB right
  50.    IF t>0 THEN GOSUB wrong
  51.    IF a$<>b$(a) THEN a$="try again,"+n$+"?":GOSUB talk:t=t+1:GOTO again
  52.    
  53.    
  54. wrong:
  55.    a$="Sorry.  you missed it.  Here is how to spell,"+b$(a)+"":GOSUB talk
  56.    LOCATE (4+e),14
  57.    e=e+1:PRINT b$(a):GOTO spell
  58.  
  59.     right:
  60.  a$(1)="very good,"+n$+"?"
  61.  a$(2)="keep it up?"
  62.  a$(3)="excellent?"
  63.  a$(4)="wonderful?"
  64.  a$(5)="hot dog?"
  65.  a$(6)="right on?"
  66.  a$(7)="far out?"
  67.  a$(8)="awsome,"+n$+"?"
  68.  a$(9)="good job?"
  69.  a$(10)="you got it "+n$+"?"
  70.  l%=INT(RND*10+1)  
  71.  a$=""+a$(l%)+"":GOSUB talk:GOTO spell 
  72.  
  73. talk:
  74.    SAY TRANSLATE$(a$),s%
  75.    RETURN
  76.  
  77. congrats:
  78.    z=TIMER:a$="o.k."+n$+", you are finished":GOSUB talk
  79.    IF e=0 THEN 
  80.       a$="you spelled all the words right. Good work,"+n$+".":GOSUB talk
  81.       a$="can you beat your old TIME?" :GOSUB talk
  82.       END IF
  83.    IF e=1 THEN a$="you only missed won":GOSUB talk
  84.    IF e>1 THEN a$="but you missed "+STR$(e)+"":GOSUB talk
  85.    z%=INT(z-y):PRINT "time: ";z%;"seconds":a$="":GOSUB talk
  86.    PRINT :PRINT "You missed ";e;"." 
  87.    a$="would you like to spell some more,"+n$+"?":GOSUB talk
  88.    INPUT "y/n";z$:IF z$="y" THEN GOTO start :ELSE quit
  89.    
  90.   
  91.    
  92. words:
  93.   
  94.    INPUT"Be sure and spell them correctly!  ",b$(n)
  95.    a$=b$(n):GOSUB talk
  96.    IF b$(n)="" THEN GOTO go
  97.    IF n=10 THEN GOTO go
  98.    n=n+1:GOTO words
  99.    
  100.    quit:
  101.    SAY TRANSLATE$ ("o.k, "+n$+", by Bye?")
  102.    SYSTEM
  103.   
  104.