ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

418 lines
18 KiB

  1. 0 REM - COMPACTED:6/08/84
  2. 10 PRINT CHR$(27);CHR$(42):PRINT" -=*OHM'S LAW*=-"
  3. 40 PRINT" MENU"
  4. 50 PRINT:PRINT TAB(10);"(1) Find I, given VOLTAGE and RESISTANCE (E and R)"
  5. 70 PRINT TAB(10);"(2) Find R, given VOLTAGE and CURRENT (V and I)"
  6. 90 PRINT TAB(10);"(3) Find E, given CURRENT and RESISTANCE (I and R)"
  7. 110 PRINT TAB(10);"(4) Find P (POWER), given VOLTAGE and CURRENT (E and I)"
  8. 130 PRINT TAB(10);"(5) Find P (POWER), given CURRENT and RESISTANCE (I and R)"
  9. 150 PRINT TAB(10);"(6) Find P (POWER), given VOLTAGE and RESISTANCE (E and R)"
  10. 170 PRINT TAB(10);"(7) Find two resistances in parallel, given R1 and R2"
  11. 190 PRINT TAB(10);"(8) Find RT, given unequal R1, R2, R3, R4 in parallel"
  12. 270 PRINT TAB(10);"(9) Find RT, given R1,R2,R3,R4 in SERIES-PARALLEL"
  13. 290 PRINT TAB(10);"(10) Find TOTAL CAPACITANCE (CT), in series circuit"
  14. 310 PRINT TAB(10);"(11) Find TOTAL CAPACITANCE (CT), 2 caps, parallel circuit"
  15. 330 PRINT TAB(10);"(12) Find TOTAL CAPACITANCE (CT), 3 caps in parallel"
  16. 350 PRINT TAB(10);"(13) Find PEAK AC VOLTAGE, given RMS value"
  17. 370 PRINT TAB(10);"(14) Find RMS VOLTAGE, given PEAK value"
  18. 390 PRINT TAB(10);"(15) Find INDUCTIVE REACTANCE (XL)"
  19. 410 PRINT TAB(10);"(16) Find CAPACITIVE REACTANCE (XC)"
  20. 430 PRINT TAB(10);"(17) Find IMPEDANCE (Z) of a series circuit"
  21. 445 PRINT TAB(10);"(18) Find IMPEDANCE (Z) of a parallel circuit"
  22. 446 PRINT
  23. 450 PRINT" Select the number you require from the menu and press 'RETURN'"
  24. 460 LPRINT CHR$(&H1F);CHR$(1);
  25. 470 LPRINT:LPRINT CHR$(14)
  26. 480 LPRINT TAB(10);"-=*OHM'S LAW*=-"
  27. 485 LPRINT CHR$(15)
  28. 490 INPUT"Enter choice:",C
  29. 500 LPRINT"Enter choice:"
  30. 510 LPRINT"Choice is:";C
  31. 520 IF C= 0 OR C> 18 THEN 10
  32. 530 ON C GOTO 540,710,880,1050,1220,1380,1540,1700,1930,2190,2360,2560,2770,
  33. 2930,3070,3260,3430,3680
  34. 540 PRINT"Calculate CURRENT (I), given VOLTAGE and RESISTANCE (E and R)"
  35. 550 LPRINT"Calculate CURRENT (I), given VOLTAGE and RESISTANCE (E and R)"
  36. 555 PRINT:LPRINT
  37. 560 INPUT"What is the value of E, in volts:",V
  38. 570 LPRINT"What is the value of E in volts?":LPRINT;V:LPRINT
  39. 580 INPUT"Now enter the value of R, in ohms:",R
  40. 590 LPRINT"Now input the value of R, in ohms":LPRINT ;R:LPRINT
  41. 600 LET I= (V/R)
  42. 610 PRINT" I= ";(V/R);"amperes"
  43. 620 LPRINT"I= ";(V/R);"amperes"
  44. 630 PRINT:LPRINT
  45. 640 PRINT" Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  46. 650 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  47. 660 IF ANS$="Y" THEN 540
  48. 670 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  49. 680 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  50. 690 IF ANS$="Y" THEN 10
  51. 700 GOTO 10020
  52. 710 PRINT"Calculate RESISTANCE (R), given VOLTAGE and CURRENT (E and I)"
  53. 720 LPRINT"Calculate RESISTANCE (R), given VOLTAGE and CURRENT (E and I)"
  54. 730 PRINT:LPRINT
  55. 740 INPUT"Input the value of E, in volts:",V
  56. 750 LPRINT"Input E, in volts":LPRINT V
  57. 760 INPUT"Now enter the value of I, in amperes:",I
  58. 770 LPRINT"Now input the value for I, in amperes":LPRINT I
  59. 780 LET R=(V/I):PRINT"R= ";(V/I);"ohms"
  60. 790 LPRINT"R= ";(V/I);"ohms"
  61. 800 PRINT:LPRINT
  62. 810 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  63. 820 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  64. 830 IF ANS$="Y" THEN 710
  65. 835 PRINT:LPRINT
  66. 840 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  67. 850 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  68. 860 IF ANS$="Y" THEN 10
  69. 870 GOTO 10020
  70. 875 PRINT:LPRINT
  71. 880 PRINT"Calculate VOLTAGE (E), given CURRENT and RESISTANCE (I and R)"
  72. 890 LPRINT"Calculate VOLTAGE (E), given CURRENT and RESISTANCE (I and R)"
  73. 895 PRINT:LPRINT
  74. 900 INPUT"Enter the value for I, in amperes:",I
  75. 910 LPRINT"Input the value for I, in amperes":LPRINT I
  76. 920 INPUT"Now enter the value for R, in ohms:",R
  77. 930 LPRINT"Now enter the value for R, in ohms":LPRINT R
  78. 940 LET E=(I*R):PRINT"E= ";(I*R);"volts"
  79. 950 LPRINT"E= ";(I*R);"volts"
  80. 960 PRINT:LPRINT
  81. 970 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  82. 980 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  83. 990 IF ANS$="Y" THEN 880
  84. 995 PRINT:LPRINT
  85. 1000 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  86. 1010 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  87. 1020 IF ANS$="Y" THEN 10
  88. 1030 GOTO 10020
  89. 1040 PRINT:LPRINT
  90. 1050 PRINT"Calculate POWER(P), given VOLTAGE(E) and CURRENT(I)"
  91. 1060 LPRINT"Calculate POWER (P), given VOLTAGE(E) and CURRENT(I)"
  92. 1065 PRINT:LPRINT
  93. 1070 INPUT"Input the value for E, in volts:",V
  94. 1080 LPRINT"Input value for E, in volts":LPRINT V
  95. 1090 INPUT"Now enter the value for I, in amperes:",I
  96. 1100 LPRINT"Now input the value for I, in amperes":LPRINT I
  97. 1110 LET P=V*I:PRINT"I= ";(V*I);"watts"
  98. 1120 LPRINT"I= ";(V*I);"watts"
  99. 1130 PRINT:LPRINT
  100. 1140 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  101. 1150 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  102. 1160 IF ANS$="Y" THEN 1050
  103. 1170 LPRINT ANS$
  104. 1175 PRINT:LPRINT
  105. 1180 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  106. 1190 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  107. 1200 IF ANS$="Y" THEN 10
  108. 1210 GOTO 10020
  109. 1220 PRINT"Calculate POWER(P), given CURRENT(I) and RESISTANCE(R)"
  110. 1230 LPRINT"Calculate POWER(P), given CURRENT(I) and RESISTANCE(R)"
  111. 1235 PRINT:LPRINT
  112. 1240 INPUT"Enter the value for I, in amperes:",I
  113. 1250 LPRINT"Input the value for I, in amperes":LPRINT I
  114. 1260 INPUT"Now enter the value for R, in ohms:",R
  115. 1270 LPRINT"Now enter the value for R, in ohms":LPRINT R
  116. 1280 LET P=(I*I)*R:PRINT"P= ";(I*I)*R;"watts"
  117. 1290 LPRINT"P= ";(I*I)*R;"watts"
  118. 1300 PRINT:LPRINT
  119. 1310 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  120. 1320 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  121. 1330 IF ANS$="Y" THEN 1220
  122. 1335 PRINT:LPRINT
  123. 1340 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  124. 1350 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  125. 1360 IF ANS$="Y" THEN 10
  126. 1370 GOTO 10020
  127. 1380 PRINT"Calculate POWER(P), given VOLTAGE(E) and RESISTANCE(R)"
  128. 1385 PRINT:LPRINT
  129. 1390 LPRINT"Calculate POWER(P), given VOLTAGE(E) and RESISTANCE(R)"
  130. 1400 INPUT"Enter the value for E, in volts:",V
  131. 1410 LPRINT"Input the value for E, in volts":LPRINT V
  132. 1420 INPUT"Now enter the value for R, in ohms:",R
  133. 1430 LPRINT"Now enter the value for R, in ohms":LPRINT R
  134. 1440 LET P=(V*V)/(R):PRINT"P= ";(V*V)/(R);"watts"
  135. 1450 LPRINT"P= ";(V*V)/(R);"watts"
  136. 1460 PRINT:LPRINT
  137. 1470 PRINT"Do you wish to do this calculation again ? (Y/N)":INPUT ANS$
  138. 1480 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  139. 1490 IF ANS$="Y" THEN 1380
  140. 1495 PRINT:LPRINT
  141. 1500 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  142. 1510 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  143. 1520 IF ANS$="Y" THEN 10
  144. 1530 GOTO 10020
  145. 1535 PRINT:LPRINT
  146. 1540 PRINT"Calculate TOTAL RESISTANCE(RT) in parallel, given R1,R2"
  147. 1550 LPRINT"Calculate TOTAL RESISTANCE(RT) in parallel, given R1,R2"
  148. 1555 PRINT:LPRINT
  149. 1560 INPUT"Input the value for R1:",R1
  150. 1570 LPRINT"Input value for R1, in ohms":LPRINT R1
  151. 1580 INPUT"Now input the value for R2:",R2
  152. 1590 LPRINT"Now enter value for R2, in ohms":LPRINT R2
  153. 1600 LET RT= (R1*R2)/(R1+R2):PRINT"RT= ";(R1*R2)/(R1+R2);"ohms"
  154. 1610 LPRINT"RT= ";(R1*R2)/(R1+R2);"ohms"
  155. 1620 PRINT:LPRINT
  156. 1630 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  157. 1640 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  158. 1650 IF ANS$="Y" THEN 1540
  159. 1655 PRINT:LPRINT
  160. 1660 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  161. 1670 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  162. 1680 IF ANS$="Y" THEN 10
  163. 1690 GOTO 10020
  164. 1695 PRINT:LPRINT
  165. 1700 PRINT"Calculate TOTAL RESISTANCE(RT), given unequal R1,R2,R3,R4 values"
  166. 1710 LPRINT"Calculate TOTAL RESISTANCE(RT), given unequal R1,R2,R3,R4 values"
  167. 1715 PRINT:LPRINT
  168. 1720 PRINT"Enter the values for R1,R2,R3 and R4, in ohms"
  169. 1730 LPRINT"Enter the values for R1,R2,R3 and R4, in ohms"
  170. 1740 INPUT"R1=",R1
  171. 1750 INPUT"R2=",R2
  172. 1760 INPUT"R3=",R3
  173. 1770 INPUT"R4=",R4
  174. 1780 LPRINT"R1=";R1;"ohms"
  175. 1790 LPRINT"R2=";R2;"ohms"
  176. 1800 LPRINT"R3=";R3;"ohms"
  177. 1810 LPRINT"R4=";R4;"ohms":LPRINT
  178. 1820 LET RT=(1)/(1/R1+1/R2+1/R3+1/R4)
  179. 1830 PRINT"RT= ";(1)/(1/R1+1/R2+1/R3+1/R4);"ohms"
  180. 1840 LPRINT"RT= ";(1)/(1/R1+1/R2+1/R3+1/R4);"ohms"
  181. 1850 PRINT:LPRINT
  182. 1860 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  183. 1870 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  184. 1880 IF ANS$="Y" THEN 1700
  185. 1885 PRINT:LPRINT
  186. 1890 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  187. 1900 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  188. 1910 IF ANS$="Y" THEN 10
  189. 1920 GOTO 10020
  190. 1925 PRINT:LPRINT
  191. 1930 PRINT"Calculate TOTAL RESISTANCE(RT), in series-parallel,"
  192. 1940 PRINT"given R1, R2, R3 and R4"
  193. 1950 LPRINT"Calculate TOTAL RESISTANCE(RT), in series-parallel,"
  194. 1960 LPRINT"given R1, R2, R3 and R4"
  195. 1965 PRINT:LPRINT
  196. 1970 PRINT"Enter the values for R1, R2, R3 and R4"
  197. 1980 LPRINT"Enter the values for R1, R2, R3 and R4"
  198. 1990 INPUT"R1=",R1
  199. 2000 INPUT"R2=",R2
  200. 2010 INPUT"R3=",R3
  201. 2020 INPUT"R4=",R4
  202. 2030 LPRINT"R1=";R1;"ohms"
  203. 2040 LPRINT"R2=";R2;"ohms"
  204. 2050 LPRINT"R3=";R3;"ohms"
  205. 2060 LPRINT"R4=";R4;"ohms"
  206. 2070 PRINT:LPRINT
  207. 2080 LET RT=(1)/(1/(R1+R2))+(1/(R3+R4))
  208. 2090 PRINT"RT=";(1)/(1/(R1+R2))+(1/(R3+R4));"ohms"
  209. 2100 LPRINT"RT=";(1)/(1/(R1+R2))+(1/(R3+R4));"ohms"
  210. 2110 PRINT:LPRINT
  211. 2120 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  212. 2130 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  213. 2140 IF ANS$="Y" THEN 1930
  214. 2145 PRINT:LPRINT
  215. 2150 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  216. 2160 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  217. 2170 IF ANS$="Y" THEN 10
  218. 2180 GOTO 10020
  219. 2185 PRINT:LPRINT
  220. 2190 PRINT"Calculate TOTAL CAPACITANCE(CT), in series circuit, given C1 and C2"
  221. 2200 LPRINT"Calculate TOTAL CAPACITANCE(CT), series circuit, given C1 and C2"
  222. 2205 PRINT:LPRINT
  223. 2210 INPUT"Enter value for C1, in MFD:",C1
  224. 2220 INPUT"Now enter the value for C2, in MFD:",C2
  225. 2230 LPRINT"Now enter the value for C2"
  226. 2240 LPRINT"C1=";C1;"mfd"
  227. 2250 LPRINT"C2=";C2;"mfd"
  228. 2260 LET CT=(C1*C2)/(C1+C2):PRINT"CT=";(C1*C2)/(C1+C2);"mfd"
  229. 2270 LPRINT"TOTAL CAPACITANCE(CT)=";(C1*C2)/(C1+C2);"mfd"
  230. 2280 PRINT:LPRINT
  231. 2290 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  232. 2300 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  233. 2310 IF ANS$="Y" THEN 2190
  234. 2315 PRINT:LPRINT
  235. 2320 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  236. 2330 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  237. 2340 IF ANS$="Y" THEN 10
  238. 2350 GOTO 10020
  239. 2355 PRINT:LPRINT
  240. 2360 PRINT"Calculate TOTAL CAPACITANCE(CT), parallel circuit, given C1 and C2"
  241. 2380 LPRINT"Calculate TOTAL CAPACITANCE(CT), parallel circuit, given C1 and C2"
  242. 2395 PRINT:LPRINT
  243. 2400 INPUT"Enter the value for C1, in mfd:",C1
  244. 2410 LPRINT"Enter the value for C1, in mfd"
  245. 2420 INPUT"Now enter the value for C2, in mfd:",C2
  246. 2430 LPRINT"Now enter the value for C2, in mfd"
  247. 2440 LPRINT"C1=";C1;"mfd"
  248. 2450 LPRINT"C2=";C2;"mfd"
  249. 2460 LET CT=(C1*C2)/(C1+C2):PRINT"CT=";(C1*C2)/(C1+C2);"mfd"
  250. 2470 LPRINT"CT=";(C1*C2)/(C1+C2);"mfd"
  251. 2480 PRINT:LPRINT
  252. 2490 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  253. 2500 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  254. 2510 IF ANS$="Y" THEN 2360
  255. 2515 PRINT:LPRINT
  256. 2520 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  257. 2530 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  258. 2540 IF ANS$="Y" THEN 10
  259. 2550 GOTO 10020
  260. 2555 PRINT:LPRINT
  261. 2560 PRINT"Calculate TOTAL CAPACITANCE(CT) for a parallel circuit,"
  262. 2570 PRINT"given C1, C2 and C3, in mfd"
  263. 2580 LPRINT"Calculate TOTAL CAPACITANCE(CT) for a parallel circuit,"
  264. 2590 LPRINT"given C1, C2 and C3, in mfd"
  265. 2595 PRINT:LPRINT
  266. 2600 INPUT"C1=",C1
  267. 2610 INPUT"C2=",C2
  268. 2620 INPUT"C3=",C3
  269. 2630 LPRINT"C1=";C1;"mfd"
  270. 2640 LPRINT"C2=";C2;"mfd"
  271. 2650 LPRINT"C3=";C3;"mfd"
  272. 2660 PRINT:LPRINT
  273. 2670 LET CT=(C1+C2+C3):PRINT"CT=";(C1+C2+C3);"mfd"
  274. 2680 LPRINT"CT=";(C1+C2+C3);"mfd"
  275. 2690 PRINT:LPRINT
  276. 2700 PRINT"D0 you wish to do this calculation again? (Y/N)":INPUT ANS$
  277. 2710 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  278. 2720 IF ANS$="Y" THEN 2560
  279. 2725 PRINT:LPRINT
  280. 2730 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  281. 2740 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  282. 2750 IF ANS$="Y" THEN 10
  283. 2760 GOTO 10020
  284. 2765 PRINT:LPRINT
  285. 2770 PRINT"Calculate PEAK AC VOLTAGE, given RMS value"
  286. 2780 LPRINT"Calculate PEAK AC VOLTAGE, given RMS value"
  287. 2785 PRINT:LPRINT
  288. 2790 INPUT"Enter the RMS value, in volts:",RMS
  289. 2800 LPRINT"Enter the RMS value, in volts"
  290. 2810 LPRINT"RMS=";RMS;"volts"
  291. 2820 LET PEAK=(RMS*1.414):PRINT"PEAK=";(RMS*1.414);"volts"
  292. 2830 LPRINT"PEAK=";(RMS*1.414);"volts"
  293. 2840 PRINT:LPRINT
  294. 2850 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  295. 2860 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  296. 2870 IF ANS$="Y" THEN 2770
  297. 2875 PRINT:LPRINT
  298. 2880 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  299. 2890 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  300. 2900 IF ANS$="Y" THEN 10
  301. 2910 GOTO 10020
  302. 2920 PRINT:LPRINT
  303. 2930 PRINT"Calculate RMS VOLTAGE, given a value in PEAK VOLTS"
  304. 2940 LPRINT"Calculate RMS VOLTAGE, given a value in PEAK VOLTS"
  305. 2945 PRINT:LPRINT
  306. 2950 INPUT"Enter the PEAK value, in volts AC:",PEAK
  307. 2960 LPRINT"PEAK VOLTS=";PEAK
  308. 2970 LET RMS=(.707*PEAK):PRINT"RMS=";(.707*PEAK);"volts AC"
  309. 2980 LPRINT"RMS=";(.707*PEAK);"volts AC"
  310. 2990 PRINT:LPRINT
  311. 3000 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  312. 3010 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  313. 3020 IF ANS$="Y" THEN 2930
  314. 3025 PRINT:LPRINT
  315. 3030 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  316. 3040 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  317. 3050 IF ANS$="Y" THEN 10
  318. 3060 GOTO 10020
  319. 3065 PRINT:LPRINT
  320. 3070 PRINT"Calculate INDUCTIVE REACTANCE (XL), given FREQUENCY and INDUCTANCE"
  321. 3080 LPRINT"Calculate INDUCTIVE REACTANCE(XL), given FREQUENCY and INDUCTANCE"
  322. 3090 PRINT:LPRINT
  323. 3100 INPUT"Enter FREQUENCY (F), in Hertz:",FREQ
  324. 3110 LPRINT"Enter FREQUENCY (F), in Hertz"
  325. 3120 LPRINT"FREQUENCY=";FREQ;"Hertz
  326. 3130 INPUT"Now enter the value for INDUCTANCE (L), in henrys:",L
  327. 3140 LPRINT"Now enter the value for INDUCTANCE (L), in henrys"
  328. 3150 LPRINT"INDUCTANCE=";L;"henrys"
  329. 3160 LET XL=(2*3.1416)*FREQ*L:PRINT"XL=";(2*3.1416)*FREQ*L;"ohms"
  330. 3170 LPRINT"INDUCTIVE REACTANCE (XL)=";(2*3.1416)*FREQ*L;"ohms"
  331. 3180 PRINT:LPRINT
  332. 3190 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  333. 3200 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  334. 3210 IF ANS$="Y" THEN 3070
  335. 3215 PRINT:LPRINT
  336. 3220 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  337. 3230 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  338. 3240 IF ANS$="Y" THEN 10
  339. 3245 GOTO 10020
  340. 3250 PRINT:LPRINT
  341. 3260 PRINT"Calculate CAPACITIVE REACTANCE (XC), given FREQ(F) and CAP(C)"
  342. 3270 LPRINT"Calculate CAPACITIVE REACTANCE (XC), given FREQ(F) and CAP(C)"
  343. 3275 PRINT:LPRINT
  344. 3280 INPUT"Enter the value for FREQ(F), in Hertz:",F
  345. 3290 LPRINT"FREQ(F)=";F;"Hertz"
  346. 3300 INPUT"Now enter the value for CAP(C), in mfd:",C
  347. 3305 LPRINT"Now enter the value for CAP(C), in mfd"
  348. 3310 LPRINT"CAP(C)=";C;"mfd"
  349. 3320 PRINT:LPRINT
  350. 3330 LET XC=(1)/((2*3.1416)*F*C):PRINT"XC=";(1)/((2*3.1416)*F*C);"ohms"
  351. 3340 LPRINT"CAPACITIVE REACTANCE(XC)=";(1)/((2*3.1416)*F*C);"ohms"
  352. 3350 PRINT:LPRINT
  353. 3360 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  354. 3370 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  355. 3380 IF ANS$="Y" THEN 3260
  356. 3385 PRINT:LPRINT
  357. 3390 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  358. 3400 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  359. 3410 IF ANS$="Y" THEN 10
  360. 3415 GOTO 10020
  361. 3420 PRINT:LPRINT
  362. 3430 PRINT"Calculate IMPEDANCE(Z) of a series circuit, given values of"
  363. 3435 PRINT"RES(R), CAPACITIVE REACTANCE(XC) and INDUCTIVE REACTANCE(XL)"
  364. 3440 LPRINT"Calculate IMPEDANCE(Z) of a series circuit, given values of"
  365. 3445 LPRINT"RES(R), CAPACITIVE REACTANCE(XC) and INDUCTIVE REACTANCE(XL)"
  366. 3446 PRINT:LPRINT
  367. 3450 INPUT"Enter the value for RESISTANCE(R), in ohms:",R
  368. 3460 LPRINT"Enter the value for RESISTANCE(R), in ohms"
  369. 3470 INPUT"Enter the value for CAPACITIVE REACTANCE(XC), in ohms:",XC
  370. 3480 LPRINT"Enter the value for CAPACITIVE REACTANCE(XC), in ohms"
  371. 3490 INPUT"Enter the value for INDUCTIVE REACTANCE(XL), in ohms:",XL
  372. 3500 LPRINT"Enter the value for INDUCTIVE REACTANCE(XL), in ohms"
  373. 3510 PRINT:LPRINT
  374. 3520 LPRINT"RESISTANCE(R)=";R;"ohms"
  375. 3530 LPRINT"CAPACITIVE REACTANCE(XC)=";XC;"ohms"
  376. 3540 LPRINT"INDUCTIVE REACTANCE(XL)=";XL;"ohms"
  377. 3550 PRINT:LPRINT
  378. 3560 LET Z=SQR(R^2+((XL-XC)^2))
  379. 3570 PRINT"IMPEDANCE(Z)=";SQR(R^2+((XL-XC)^2));"ohms"
  380. 3580 LPRINT"IMPEDANCE(Z)=";SQR(R^2+((XL-XC)^2));"ohms"
  381. 3590 PRINT:LPRINT
  382. 3600 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  383. 3610 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  384. 3620 IF ANS$="Y" THEN 3430
  385. 3625 PRINT:LPRINT
  386. 3630 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  387. 3640 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  388. 3650 IF ANS$="Y" THEN 10
  389. 3660 GOTO 10020
  390. 3670 PRINT:LPRINT
  391. 3680 PRINT"Calculate IMPEDANCE (Z) of a parallel circuit"
  392. 3690 LPRINT"Calculate IMPEDANCE (Z) of a parallel circuit"
  393. 3700 PRINT:LPRINT
  394. 3710 INPUT"Enter the value of L, in henrys:",L
  395. 3720 LPRINT"Enter the value of L, in henrys"
  396. 3730 INPUT"Enter the value for FREQ (F), in Hertz:",F
  397. 3740 LPRINT"Enter the value for FREQ (F), in Hertz"
  398. 3750 INPUT"Now enter the value for RESISTANCE (R) in ohms:",R
  399. 3760 LPRINT"Now enter the value for RESISTANCE (R), in ohms"
  400. 3765 LPRINT"INDUCTANCE (L)=";L;"henrys"
  401. 3770 LPRINT"FREQ (F)=";F;" Hertz"
  402. 3775 LPRINT"RESISTANCE (R)=";R;"ohms"
  403. 3776 PRINT:LPRINT
  404. 3780 LET Z=((2*3.1416*F*L)^2)/(R)
  405. 3790 PRINT"IMPEDANCE (Z)=";((2*3.1416*F*L)^2)/(R);"ohms"
  406. 3800 LPRINT"IMPEDANCE (Z)=";((2*3.1416*F*L)^2)/(R);"ohms"
  407. 3810 PRINT"Do you wish to do this calculation again? (Y/N)":INPUT ANS$
  408. 3820 LPRINT"Do you wish to do this calculation again? (Y/N)":LPRINT ANS$
  409. 3830 IF ANS$="Y" THEN 3680
  410. 3840 PRINT:LPRINT
  411. 3850 PRINT"Do you wish to return to the menu? (Y/N)":INPUT ANS$
  412. 3860 LPRINT"Do you wish to return to the menu? (Y/N)":LPRINT ANS$
  413. 3870 IF ANS$="Y" THEN 10
  414. 3880 GOTO 10020
  415. 3890 PRINT:LPRINT
  416. 10020 PRINT"Glad to have been of service! BYE!!
  417. 10030 LPRINT"Glad to have been of service! BYE!!