home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Educational / EQUATIONS-1 (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  8KB  |  218 lines

  1. 1 GOTO112
  2. 2 PRINT"                                      ":RETURN
  3. 3 POKE198,.:UR$="":UI$=""
  4. 4 IFUL=.THENUL=80
  5. 5 POKEUC,.
  6. 6 GETUI$:IFUI$=""THEN6
  7. 7 POKESI+4,33:POKESI+1,ASC(UI$):FORWV=1TO10:NEXT:POKESI+1,.
  8. 8 IFUI$=CHR$(13)ANDLEN(UR$)>=1THENPOKEUC,1:PRINT" [157]";:UF=.:PRINT:RETURN
  9. 9 IFUI$=CHR$(20)THEN12
  10. 10 IFLEN(UR$)=>ULTHEN6
  11. 11 GOSUB15:UR$=UR$+UI$:PRINTUI$;:GOTO6
  12. 12 IFLEN(UR$)<1THEN6
  13. 13 UR$=LEFT$(UR$,LEN(UR$)-1)
  14. 14 PRINT"[157]  [157][157]";:GOTO6
  15. 15 IFLEN(US$)=.THEN18
  16. 16 FORUS=1TOLEN(US$):IFUI$<>MID$(US$,US,1)THENNEXT:UI$=""
  17. 17 RETURN
  18. 18 IFASC(UI$)=46THENRETURN
  19. 19 IFUI$=CHR$(32)THENRETURN
  20. 20 IFASC(UI$)<48ORASC(UI$)>57THEN22
  21. 21 RETURN
  22. 22 IFASC(UI$)<65ORASC(UI$)>90THEN24
  23. 23 RETURN
  24. 24 IFASC(UI$)<193ORASC(UI$)>218THENUI$="":RETURN
  25. 25 IFPEEK(UT)=UU%THENUI$=CHR$(ASC(UI$)-128):RETURN
  26. 26 RETURN
  27. 27 UI$="":RETURN
  28. 28 PRINT"[147]":POKEUT,UU%:POKE53281,9:POKE53280,8
  29. 29 PRINT""SPC(16)"MENU"
  30. 30 PRINT" --------------------------------------"
  31. 31 PRINTSPC(7)"1.   BEGIN EQUATION"
  32. 32 PRINTSPC(7)"2.   STUDENT INSTRUCTIONS"
  33. 33 PRINTSPC(7)"3.   TEACHER INSTRUCTIONS"
  34. 34 PRINTSPC(7)"4.   QUIT"
  35. 35 PRINT" --------------------------------------"
  36. 36 PRINTSPC(7)"PRESS A NUMBER KEY (1-4) ";
  37. 37 UL=1:US$="1234":GOSUB3:US$="":ONVAL(UR$)GOSUB113,40,70,39
  38. 38 GOTO28
  39. 39 POKE53281,.:POKE53280,.:PRINT"[147]":END
  40. 40 PRINT"[147]":POKEUT,UL%:POKE53281,.:POKE53280,.
  41. 41 UP=.:UG$="[211]TUDENT [201]NST":GOSUB105
  42. 42 PRINTSPC(6)"[217]OU WILL BE ASKED TO SOLVE":PRINT
  43. 43 PRINT" EQUATIONS WITH ONE VARIABLE OF THE"
  44. 44 PRINT" TYPE 3X - 5 = 7.  [212]HE OBJECT IS"
  45. 45 PRINTSPC(6)"[163][163][163][163][163][163][163][163][163][163]"
  46. 46 PRINT" QUICK MENTAL SOLUTION OF THE EQUATION"
  47. 47 PRINT" BY DETERMINING THE VALUE FOR X THAT":PRINTSPC(30)"[163]"
  48. 48 PRINT" MAKES THE EQUATION TRUE.":PRINT
  49. 49 PRINTSPC(5)"[217]OU WILL BE GIVEN 3 ATTEMPTS":PRINT
  50. 50 PRINT" BEFORE THE CORRECT ANSWER IS GIVEN.":GOSUB102:UP=2:GOSUB105
  51. 51 PRINT"    [201]F YOU FAIL IN THE 3 ATTEMPTS":PRINT
  52. 52 PRINT" YOU CAN SEE A COMPLETE SOLUTION OF":PRINT" THE PROBLEM."
  53. 53 PRINTSPC(5)"[212]HE FOLLOWING IS AN EXAMPLE "
  54. 54 PRINT" SOLUTION WORKED OUT:"
  55. 55 PRINT" [150][208]ROBLEM:"SPC(7)"3X - 5 = 7"
  56. 56 PRINT" [159][193]DD 5 TO EACH SIDE[146]"
  57. 57 PRINT" [150][210]ESULT:"SPC(9)"3X = 12"
  58. 58 PRINT" [159][196]IVIDE EACH SIDE BY 3[146]"
  59. 59 PRINT" [150][210]ESULT:"SPC(10)"X = 4":GOSUB102:UP=3:GOSUB105
  60. 60 PRINTSPC(5)"[211]OME PROBLEMS HAVE THE VARIABLE"
  61. 61 PRINT" TERM ON THE RIGHT SIDE OF THE EQUATION"
  62. 62 PRINT" AND OCCASIONALLY THERE WILL BE A"
  63. 63 PRINT" VARIABLE ON BOTH SIDES.  [199]OOD LUCK!"
  64. 64 PRINTSPC(5)"[215]HEN YOU FINISH, YOUR SCORE IS"
  65. 65 PRINT" THE NUMBER CORRECT ON THE FIRST TRY.":GOSUB102:UP=4:GOSUB105
  66. 66 PRINT" [206]OTE:[157][212]O ADVANCE FROM ONE QUESTION"
  67. 67 PRINT" TO THE NEXT PRESS THE [153][211][208][193][195][197] BAR."
  68. 68 PRINTSPC(5)"[201]F AT ANY TIME YOU WISH TO RETURN"
  69. 69 PRINT" TO THE [158][205][197][206][213] PRESS [153][209] [210][197][212][213][210][206].":GOTO102
  70. 70 PRINT"[147]":POKEUT,UL%:POKE53281,2:POKE53280,10
  71. 71 UP=.:UG$="[212]EACHER [201]NST":GOSUB105
  72. 72 PRINTSPC(6)"[212]O THE BEST OF OUR KNOWLEDGE,"
  73. 73 PRINT"   THIS PROGRAM IS IN THE PUBLIC"
  74. 74 PRINT"   DOMAIN.  [201]F THIS IS NOT THE CASE"
  75. 75 PRINT"   PLEASE CONTACT:"
  76. 76 PRINTSPC(6)"[195]OMMODORE [194]USINESS [205]ACHINES"
  77. 77 PRINTSPC(10)"3370 [208]HARMACY [193]VE.
  78. 78 [153][166]10)"ATNGINCOURT, (null)NTARIO"
  79. 79 [153][166]10)"LENANADA   (null)1(null) 2(null)4"
  80. 80 [153][166]10)"(416) 499-4292"
  81. 81 UP[178]1:[141]102:[141]105
  82. 82 [153][166]5)"(null)ROGRAM (null)AME: VALQUATION
  83. 83 PRINTSPC(5)"[215]RITTEN [194]Y  : [195]. [199]. [193]NDERSON
  84. 84 [153][166]5)"(null)PGRADED PEEKY : STR$. ATNRTHURS
  85. 85 PRINTSPC(5)"[212]HIS PROGRAM WILL RUN ON ANY
  86. 86 [153][166]9)"LEN(null)(null)(null)(null)STR$(null)(null)VAL 64 LEN(null)(null)(null)(null)(null)VAL(null)":[137]102
  87. 87 [153]"LOAD";:[151]UT,UU%:[151]53280,14:[151]53281,6
  88. 88 [129]I[178]1[164]38:[153]"SPC(WAIT";:[130]
  89. 89 [129]I[178]1[164]22:[153]"CMDSPC(WAIT";:[130]
  90. 90 [129]I[178]1[164]37:[153]"CMDCMDSPC(WAIT";:[130]
  91. 91 [129]I[178]1[164]22:[153]"ONCMDSPC(WAIT";:[130]
  92. 92 [153]""[166]18)"STEP  WAIT
  93. 93 PRINTSPC(18)" [146]   [146][169]
  94. 94 [153][166]18)" WAIT  TAB((null)
  95. 95 PRINTSPC(18)"[223]  [146]
  96. 96 [153][166]12)"C O M M O D O R E
  97. 97 PRINTSPC(15)"EDUCATIONAL
  98. 98 [153][166]16)"SOFTWARE
  99. 99 PRINTLEFT$(UD$,24)SPC(9)"PRESS SPACE BAR OR WAIT[146]":I=.:POKE198,.
  100. 100 GETA$:IFA$<>" "THENI=I+1:IFI<250THEN100
  101. 101 T1$="":T2$="":T3$="":T4$="":I=.:GOSUB202:GOTO28
  102. 102 PRINTLEFT$(UD$,24)SPC(6)"PRESS SPACE BAR TO CONTINUE[146]":POKE198,.
  103. 103 GETUI$:IFUI$<>" "THEN103
  104. 104 POKESI+4,17:POKESI+1,35:FORWV=1TO10:NEXT:POKESI+1,.:RETURN
  105. 105 UP=UP+1
  106. 106 PRINT"[147]"LEFT$(UT$+UP$,21)RIGHT$(UP$+UG$+STR$(UP),18)
  107. 107 PRINT" --------------------------------------":RETURN
  108. 108 UB=1024:U1=209:U2=210:U3=211:U4=214:UC=204
  109. 109 UT=53272:UU%=21:UL%=23:UP%=2139:UM=1024:UD$=""
  110. 110 UP$="                                       ":UT$=" [197][209][213][193][212][201][207][206]          "
  111. 111 SI=54272:FORX=SITOSI+24:POKEX,.:NEXT:POKESI+24,10:POKESI+6,240:RETURN
  112. 112 DIMP$(10),NP$(10):GOSUB108:GOSUB87:GOTO28
  113. 113 PRINT"[147]";:POKEUT,UL%:POKE53281,.:POKE53280,.:RESTORE:X0=15
  114. 114 FORX=1TO10:READP$(X):NEXT:FORX=1TO10:READNP$(X):NEXT
  115. 115 PRINT"[147]":UP=.
  116. 116 PRINT""SPC(6)"[200]OW MANY PROBLEMS WOULD"
  117. 117 PRINTSPC(6)"YOU LIKE TO SOLVE?   [157][157]";
  118. 118 US$="1234567890Q":UL=2:GOSUB3:IFUR$="Q"THENRETURN
  119. 119 E=VAL(UR$):IFE>0THEN122
  120. 120 PRINT" [159] [210]ESPONSE MUST BE GREATER THAN ZERO [146]"
  121. 121 FORWV=1TO1000:NEXT:PRINT"[145]                                       ":GOTO116
  122. 122 R=.:FORI=1TOE:PRINT"[147]"
  123. 123 X=INT(RND(1)*21)-10:IFX=.THEN123
  124. 124 Y=INT(RND(1)*41)-20:Z=INT(RND(1)*41)-20:T=INT(RND(1)*10)+1
  125. 125 IFT-X=.ORT+X=.THEN123
  126. 126 D=X+T:F=X-T:A$=STR$(X):D$=STR$(T):E$=STR$(D):F$=STR$(F):L$=A$
  127. 127 IFX-T=-1THENF$="-"
  128. 128 IFX+T=-1THENE$="-"
  129. 129 IFX-T=1THENF$=" "
  130. 130 IFX+T=1THENE$=" "
  131. 131 IFX=-1THENA$="-"
  132. 132 IFX=1THENA$=" "
  133. 133 IFT=1THEND$=" "
  134. 134 B$=STR$(Y):C$=STR$(Z):IF(Z-Y)/X=INT((Z-Y)/X)THEN136
  135. 135 GOTO123
  136. 136 UG$="[209]UESTION #":UP=I-1:GOSUB105:PRINT"";:B=INT(RND(1)*3)+1
  137. 137 IFY<0THEN142
  138. 138 ONBGOTO139,140,141
  139. 139 PRINTA$"X +"B$" ="C$;:GOTO146
  140. 140 PRINTC$" ="A$"X +"B$;:GOTO146
  141. 141 PRINTE$"X +"B$" ="C$" +"D$"X";:GOTO146
  142. 142 B$=STR$(-Y):ONBGOTO143,144,145
  143. 143 PRINTA$"X -"B$" ="C$;:GOTO146
  144. 144 PRINTC$" ="A$"X -"B$;:GOTO146
  145. 145 PRINTF$"X -"B$" ="C$" -"D$"X";:GOTO146
  146. 146 FORM=1TO3
  147. 147 W=UP:PRINTTAB(25)"X = ";:US$="1234567890-Q":UL=3:GOSUB3:C=VAL(UR$)
  148. 148 IFUR$="Q"THENRETURN
  149. 149 UP=W:PRINT:IFC<>(Z-Y)/XTHEN153
  150. 150 GOSUB2:K=INT(RND(0)*10)+1:PRINT"[145]"TAB((40-LEN(P$(K)))/2)P$(K)
  151. 151 GOSUB196:GOSUB102:IFC=(Z-Y)/XANDM=1THENR=R+1
  152. 152 GOTO160
  153. 153 GOSUB2:K=INT(RND(0)*10)+1:PRINT"[145]"TAB((40-LEN(NP$(K)))/2)NP$(K)
  154. 154 GOSUB199:FORWV=1TO500:NEXT:PRINT"[145]                                      "
  155. 155 PRINT"[145][145][145][145][145]"TAB(26)"      [157][157][157][157][157][157][157][157][157]";:NEXTM
  156. 156 PRINT""SPC(8)"[212]HE ANSWER IS "(Z-Y)/X"[157].      "
  157. 157 PRINT" [150][215]OULD YOU LIKE TO SEE THE SOLUTION? ";
  158. 158 US$="YNQ":UL=1:GOSUB3:M$=UR$:IFM$="Y"THENGOSUB169
  159. 159 IFM$="Q"THENRETURN
  160. 160 NEXTI:UG$="[211]CORE        ":UP=.:GOSUB105
  161. 161 PRINT" [150][217]OU HAVE"R"[150]CORRECT OUT OF"E"[150]TRIES."
  162. 162 PRINT" [150][215]OULD YOU LIKE TO TRY AGAIN? ";
  163. 163 US$="YNQ":UL=1:GOSUB3:X$=UR$:IFX$="Y"THEN115
  164. 164 RETURN
  165. 165 DATA"[214]ERY GOOD","[212]HAT'S RIGHT","[195]ORRECT","[206]ICE WORK","[197]XCELLENT"
  166. 166 DATA"[212]ERRIFIC","[211]UPER","[198]ANTASTIC","[199]REAT","[217]ES"
  167. 167 DATA"[211]ORRY","[212]OO BAD","[201]NCORRECT","[206]O","[215]RONG"
  168. 168 DATA"[194]UMMER","[217]OU BLEW IT","[193]RE YOU KIDDING","[211]O SAD","[200]A HA HA"
  169. 169 PRINT"[147]":ONBGOTO170,180,188
  170. 170 IFY<0THEN173
  171. 171 PRINT"  [150][208]ROBLEM:     "A$"X +"B$" ="C$
  172. 172 PRINTSPC(7)"[159][211]UBTRACT "B$" FROM EACH SIDE[146]":GOTO176
  173. 173 B$=STR$(-Y)
  174. 174 PRINT"  [150][208]ROBLEM:     "A$"X -"B$" ="C$
  175. 175 PRINTSPC(10)"[159][193]DD "B$" TO EACH SIDE[146]"
  176. 176 W=Z-Y:G$=STR$(W)
  177. 177 PRINT"  [150][210]ESULT:"SPC(8)A$"X ="G$:PRINT:IFX=1THEN195
  178. 178 PRINTSPC(9)"[159][196]IVIDE EACH SIDE BY "L$"":S=W/X:S$=STR$(S)
  179. 179 PRINT"  [150][210]ESULT:"SPC(9)"X ="S$:GOTO195
  180. 180 IFY<0THEN183
  181. 181 PRINT"  [150][208]ROBLEM:     "C$" ="A$"X +"B$
  182. 182 PRINTSPC(7)"[159][211]UBTRACT "B$" FROM EACH SIDE[146]":GOTO185
  183. 183 B$=STR$(-Y):PRINT"  [150][208]ROBLEM:     "C$" ="A$"X -"B$
  184. 184 PRINTSPC(10)"[193]DD "B$" TO EACH SIDE[146]"
  185. 185 W=Z-Y:G$=STR$(W):PRINT"  [150][210]ESULT:"SPC(8)G$" ="A$"X":IFX=1THEN195
  186. 186 PRINTSPC(9)"[159][196]IVIDE EACH SIDE BY "L$"":S=W/X:S$=STR$(S)
  187. 187 PRINT"  [150][210]ESULT:"SPC(9)S$" = X":GOTO195
  188. 188 IFY<0THEN192
  189. 189 PRINT"  [150][208]ROBLEM:  "E$"X +"B$" ="C$" +"D$"X"
  190. 190 PRINTSPC(7)"[159][211]UBTRACT "D$"X FROM EACH SIDE[146]"
  191. 191 PRINT"  [150][210]ESULT:    "A$"X +"B$" ="C$:PRINT:GOTO172
  192. 192 PRINT"  [150][208]ROBLEM:  "F$"X -"B$" ="C$" -"D$"X"
  193. 193 PRINTSPC(10)"[159][193]DD "D$"X TO EACH SIDE"
  194. 194 PRINT"  [150][210]ESULT:    "A$"X -"B$" ="C$:PRINT:GOTO175
  195. 195 GOTO102
  196. 196 X0=X0+2+8*(X0=23):POKESI+4,X0:FORDV=1TO3:FOREZ=.TO5:POKESI+15,33
  197. 197 FORWV=(10+EZ*10)TO(10+EZ*20)STEP11:POKESI+1,WV:NEXTWV,EZ,DV:POKESI+1,.
  198. 198 POKESI+1,.:POKESI+15,.:RETURN
  199. 199 POKESI+4,.:POKESI+13,249:POKESI+11,23:FORDV=1TO3:POKESI+1,INT(RND(6)*25)+5
  200. 200 FOREZ=.TO183STEP17:POKESI+8,EZ:NEXT:FOREZ=183TO.STEP-10:POKESI+8,EZ
  201. 201 NEXTEZ,DV:POKESI+11,22:RETURN
  202. 202 SI=54272:FORX=SITOSI+24:POKEX,.:NEXT:POKESI+24,10:POKESI+6,240
  203. 203 POKE53280,.:POKE53281,.:PRINT"[147]"SPC(11)"[158][194]ROUGHT TO YOU BY"
  204. 204 PRINTSPC(7)"[197]VANSVILLE [208]RINTING [195]ORP.":PRINTSPC(7)"";
  205. 205 PRINT"[205]ODIFIED BY: [211]EAN [215]INSTEAD":POKESI+4,33
  206. 206 FOREZ=1TO33:PRINT""SPC(7)"[152][197]VAN[152]SVIL[152]LE [208]R[152]INTI[152]NG [195]O[152]RP."
  207. 207 PRINTSPC(20)"[152][211]EAN [152][215]INS[152]TEAD"
  208. 208 POKESI+1,8+EZ*.5:FORWV=1TO10:NEXT:POKESI+1,.:FORWV=1TO10:NEXT
  209. 209 PRINT""SPC(7)"[152][197]VA[152]NSVI[152]LLE [208][152]RINT[152]ING [195][152]ORP."
  210. 210 PRINTSPC(20)"[152][211]EA[152]N [215]IN[152]STEA[152]D"
  211. 211 POKESI+1,20/(EZ/4):FORWV=1TO10:NEXT:POKESI+1,.:FORWV=1TO10:NEXT
  212. 212 PRINT""SPC(7)"[197]V[152]ANSV[152]ILLE [152][208]RIN[152]TING [152][195]ORP[152]."
  213. 213 PRINTSPC(20)"[211]E[152]AN [215]I[152]NSTE[152]AD"
  214. 214 POKESI+1,9+EZ/6:FORWV=1TO10:NEXT:POKESI+1,.:FORWV=1TO10:NEXT
  215. 215 PRINT""SPC(7)"[197][152]VANS[152]VILL[152]E [208]RI[152]NTIN[152]G [195]OR[152]P."
  216. 216 PRINTSPC(20)"[211][152]EAN [215][152]INST[152]EAD";
  217. 217 POKESI+1,50-EZ*1.5:FORWV=1TO10:NEXT:POKESI+1,.:FORWV=1TO10:NEXTWV,EZ:RETURN
  218.