ZXTape! 0Created with Ramsoft MakeTZXFORMULAE    N0:0:0::236099\,502:0:0:0 q$="y"x -z$="  " K12 ,10 ;1;4;"PLEASE WAIT";0;0 "" .a=07:a,0;1;z$:a (H12 ,6;4;1;" LOADING PROGRAM ";:0 -*18,5;" " .13 ,0; / 0 2 "file" <*:15,0;"Leave tape running" F"" P*15,0;"Stop and rewind tape" R"clear (y/n) ?";q$ Tq$="y""address ? ";x ZJ17,0;"Type in file name in ";1;"UPPER CASE";0 n"Filename",a$ o015,0;"Recording " p517,0;" " x a$10 "logo"16384@,2304  '10 ,5;"Load main program" )12 ,5;"SAVE""file"" LINE 2" Z&  QnAFORMULAE9hlogo @  ??80?߀????>?#|?~???|?|~?8???1???<???????<?0~|??~?~|?|~?>??#???8??????1???????~<?|??|~?|?|~?|?|~???9??>?? ?????8<0p??>?x?~file +*7+cop=6140 2 "Formulae" 7John McMullan <ZX Spectrum 48K "p$(4,12 ):s(4) XTbp=6400:b1=6500d:b2=6600:w$=" " _0:0:6::2:7300:6:62008:7400:7000X i=1q:j=1p "s=5:c=0:2000 L6:::0,0;p$(j);0,15;"Question ";i;" ";2,0;"Score:";5;s(j);6;2,15;"Attempt ",;4;"________________________________":4 j262008:6;2,23;6-s oL7;5,4;"What is the formula of";7,5;c$;"?" t:14,3;5;"Type in your answer then press the ENTER key. "::" ENTER 'G' to Give up"::" ENTER 'I' for Instructions":" ENTER 'H' for Help":" ENTER 'D' for Data" u:4:0,80P::255,0::5:10 ,65A:230,0:0,-65A:-230,0:0,65A ~ 5000 D13 ,0;;w$;w$;w$;w$;w$;w$;w$;w$;w$;21,0;w$ 'i$="D"i$="d"3800:1100L 'i$="I"i$="i"7500L:1100L 'i$="H"i$="h"3000 :1100L >i$="G"i$="g"s=0:3000 :6000p:1500  i$="D"3800:1100L i$=f$2500 :1500 (#2700 :s>01100L j 85004!:iq6000p i  6000p " =""1570 ,:  2m=(*15)+1:n=(*10 )+1 E(m=14(n=4n=5))m=15n=82010 P:k=1m:m$,s$,u$:k:a$=u$:9050Z#:k=1n:n$,t$,v$:k:b$=v$ 4c$=m$+" "+n$ >m142190 Rn=1c$="nitric acid" \n=2c$="carbonic acid" f n=3c$="sulphuric acid" p!n=6c$="phosphoric acid" zn=8c$="water" #n=9 c$="hydrochloric acid" g$="":h$="":j$="":k$="" u$=v$u$="1":v$="1" (m=15ưv$>1g$="(":h$=")" 'n6ưu$>1j$="(":k$=")" u$="1"u$="" v$="1"v$="" f$=g$+s$+h$+v$+j$+t$+k$+u$  ē62008:k=112 :.1}L,k:k:5,0;3;"Correct. ";8,2;"The formula of ";9 ,2;c$;" is" #z$=f$:x=16-z$:6300 <s519,2;6-s;" attempts needed." 9s=519,2;"Correct first go ";p$(j); s(j)=s(j)+s:c=1 B2,6;s(j);2,15;" ":6000p  Zc=421:c,0;w$:c:s=s-1:.5,-10 :1,-16 c=421:c,0;w$:c:6,0;w$;w$;w$;w$;w$;w$;w$;5,0;"Wrong answer ";p$(j):z$=i$:x=10 :6300:16,0; 'err=0:z$=s$:g$=m$:2900T z$=t$:g$=n$:2900T /err=0"Check valencies &/or brackets." #s26100:3000 6000p  Tk=1̱i$-z$+1 ^$i$(kk+z$-1)z$2930r ck+z$>i$2925m h-z$=1Ưi$(k+z$)>96`2930r mx=1:k=i$-z$+1 rk |"x=1x=0:2990 -err=1:"Check the symbol for ";g$;"."  mt=m:nm=n .i$=1Ưi$>90Zi$=(i$-32 ) !:62008:8,0; 7300 ֛8,0;("Too bad-you gave up"i$="G")+("You need help!!!!"(i$"G"i$"H"s0))+("You'd better give up!!"(s=0i$"G")):6100 5i$"G"s02000:m=mtn=nm3100 0u$=a$:v$=b$ M8,0;w$;8,2;"Working out a formula...":6100 L8,0;w$;8,2;"Start with the name....":6100 &b1:12 ,5;c$:6100 M8,0;w$;8,2;"Put down the symbols....":6100 cb1:12 ,0;w$:x=4:z$=s$:6300:x=19:z$=t$:6300:6100 Q8,0;w$;8,2;"Write down the valencies....":6100 <b1:16,5;u$;16,20;v$:6100 u$=1u$v$3320 C8,0;w$;8,2;"Cancelling....":6100 J16,5;1;u$;16,20;1;v$:6100 Lb2:u$="1":v$="1":16,5;u$;16,20;v$:6100 8,0;w$;8,2;"There "+("are "ưv$>1)+("is "ưv$=1);v$;" ";m$;("'s"ưv$>1):16,20;1;v$:6100 =b2:16,20;" ";13 ,9 ;v$:6100 8,0;w$;8,2;"There "+("are "ưu$>1)+("is "ưu$=1);u$;" ";n$;("'s"ưu$>1):16,5;1;u$:6100 =b2:16,5;" ";13 ,24;u$:6100 *ag$="("j$="("8,0;w$;8,0;"Put in brackets for groups...":6100 49g$="("12 ,4;"(";12 ,8;")":b1 >;j$="("12 ,19;"(";12 ,23;")":b1 Cg$="("j$="("6100 Hbu$="1"v$="1"8,0;w$;8,0;"We don't need to put '1's in..":6100 Rv$="1"13 ,9 ;" " \ u$="1"13 ,24;" " fu$="1"v$="1"b2:6100 pI62008:8,2;"The formula of";9 ,5;c$;" is" z#b1:x=10 :z$=f$:6300 m=mt:n=nm:2070 i$="H"6000p  1:1;" Data " $:,,,5;"Symbol Valency",,  k=125 (g$,h$,j$:g$;17;h$;28;j$ (Jk=15k=25cop::k=15,5;"Symbol Valency",, 2k P 2i$="":23658j\=823658j\,0 ""5010 x$=:x$=""5020 ;x$=13 Ʊi$05,0;w$:5200P mx$=12 i$""i$=i$(̱i$-1):bp:9 ,7+i$;" ";10 ,7+i$;" ":5010 x$="8"x$="(" x$="9"x$=")" x=x$ lx<40((x>41)x<491)(x>58:x<65A)(x>90Zx<97a)x>122z5010 bp  i$=i$+x$ (x$>"@"x$<"*"9 ,6+i$;x$ #+x$<"8"x$>"0"10 ,6+i$;x$ (i$>20 2 5010 P p+21,31;1;"*":15 z=""6000p bp:21,0;w$  (k=1150:""k=150 k  W 20,7;"PRESS 'C'COPY";21,1;" OR ANY OTHER KEY TO CONTINUE" =""6140 V="c"20,0;w$;21,0;w$;:#1;" COPYING":  8&k=621:k,0;w$:k B k=1̱z$ D 5;12 +(z$(k)<58:Ưz$(k)>47/),x+k;z$(k):k  .1}L,12 : d.1}L,-4: &k=012 :.01z# =,k:k: b410 ,0;"How many people are playing? "; l23624H\,6:r$= vr$=""7020l 3r$>524ůr$<491űr$>17020l p=r$:bp:;5;p: $p>1"What are their names?"  i=1p kp=1"Enter your name :";r$:r$=""űr$>15űr$<2ůr$>122zůr$<65A7090 p=17101 ci=1"Player 1:";r$:r$=""űr$>15űr$<2ůr$>122zůr$<65A7100 ci=2"Player 2:";r$:r$=""űr$<2űr$>15ůr$>122zůr$<65A7100 ci=3"Player 3:";r$:r$=""űr$<2űr$>15ůr$>122zůr$<65A7100 ci=4"Player 4:";r$:r$=""űr$>15űr$<2ůr$>122zůr$<65A7100 -r$>96`r$(1)=((r$)-32 ) Pp=1bp:8800`":p$(i)=r$:"Hello ";5;r$;" !"::7150 <:8800`":p$(i)=r$:bp:5;"Player ";i;":";p$(i) :i: 0"How many questions ?:";r$:r$=""7150 r$>27150 9r$(1)>579ůr$(1)<4807150  =r$=2r$(2)>579ůr$<4807150 )q=r$:q<1q>10 7150 0bp:6:"Number of questions ";5;q  4: ::.2~L,9 :.2~L,10 :.2~L,12 15,5;2;" ";16,5;" ";17,5;" ";18,5;" " 'c=113 :aa=3582 :c  >13 ,0;6;"Do you need instructions (Y/N)?" r$=:r$=""7410 Zr$=:r$="N"r$="n"13 ,31;"N":.3,10 :13 ,0;w$: \bp:r$="Y"r$="y"13 ,31;"Y":.3,10 :7500L:7300:  7410 L/:1;" INSTRUCTIONS " V,," You will be given the name of acompound and you must enter itsformula. You are allowed up to 5attempts at each question." `5,," Type 'H' (for help) to see an"," example." jG" Type 'D' (for data) to display"," symbols,formulae & valencies." t9" Type 'G' (for give up) if"," you're really stuck." ~E" Type 'I' (for instructions) to see these instructions again." @,," After each answer, you must","press the ENTER key." J'" To delete mistakes, hold down","CAPS SHIFT and press DELETE." 6000p: ,," If you want to enter a capitalletter , hold CAPS SHIFT andpress the appropriate letterkey. For small letters justpress the appropriate key." g,,"You do not need to hold down theSHIFT key to enter bracketsjust press 8 or 9." 6000p:  !4: !>P7,5;1;" *Scoreboard* ":iq,,"After question ";i !H k=1p !R sc=(s(k)/i*20+.5) !\;10 +k,0;k;": ";p$(k);sc;10 +k,20; !f("Well done!"sc>80P)+("Good"(sc80Psc>502))+("Fair"(sc502sc>20))+("Get help!!"sc20) !k:,,"(Scores out of 100)" ": "` Name slicer "j&v=1̱r$:r$(v)=" "8820t" "ov "tr$=r$(v-1): #("aluminium","Al","3","calcium","Ca","2","cobalt","Co","2","copper(ii)","Cu","2","gold(i)","Au","1","iron(ii)","Fe","2","iron(iii)","Fe","3","lead(ii)","Pb","2" #F"magnesium","Mg","2","potassium","K","1","sodium","Na","1","tin(ii)","Sn","2","zinc","Zn","2","hydrogen","H","1","ammonium","NH4","1" #Z"nitrate","NO3","1","carbonate","CO3","2","sulphate","SO4","2","nitrite","NO2","1","hydroxide","OH","1","phosphate","PO4","3","bromide","Br","1","oxide","O","2" #n&"chloride","Cl","1","iodide","I","1" &"file"1: '"": o5 Ewe dW !pj"R2qsmnM aluminiumSAlU3