ZXTape! 0Created with Ramsoft MakeTZXbalance G|!60000`:6:6: ""  4:"" Q#1;1;6;1;1;" Program is now loading. " #/6:6:1:20,0; ("" balance @ng< B<<B@<<<@BB<@8(BBB<<<<<<<<<<<<<<<<<<<<<<<< <@B 0DxB< >>>@B DD>B>>>(((BBZ <<< /<8"@|< @??B8<8hB$B DD T((h@>>>| DD >>DD D???O@@ D< DT@  @@/ @ 8 0x`?  0>x|<>x   008  `0  0x<x<   00>  `0x  0>@@x   00  c`0  ????  `0  sp0>  ?xx<x<8`p`p 0>  `0x   ;00>x|<>x880  `0   00x<x<0Ã`?>   80xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffiiiiiiiiiiiiiiiiiiiiiiffffeefffeeeeeeeeeeeeeeeeeeeeeeeeeffeeff``ffeeffFFFFFFFFFFFFFFFFFF`ffeeffFFFFFFFFFFFFFFFFFFffeeffFFFFFFFFFFFFFFFFFFffeeffFFFFFFFFFFFFFFFFFFFFffeeffffeeffCCCCCCCCCCCCCCCCCCCCffeeffCCCCCCCCCCCCCCCCCCCCffeeffCCCCCCCCCCCCCCCCCCCCffeeff`CCCCCCCCCCCCCCCCCCCCCCffeeff``ffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeessssfffffppppppppppppppfffffvvvv                       vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv8888888888888888888888888888888888888888888888888888888888888888balance ccCc  S.C.Wright.Sept.1983   9000(# 20,0;:"code"60000`,600X:"":6;21,0;" ":a$(704):f=18:1;f-7*(f=8);8;0,0;a$:.05|L,f:f:200:9000(# m(a ,b =q)=(a+b+(a-b))/2:n()=(65536*23674z\+256*23673y\+23672x\)/502:t()=m(n(),n()): i=23300[,60<:23301[,235:60200(: 1nw=0:ni=1:wpi=1:a(8):a$(6,3):b(8):b$(6,3):c(2,4):d(8):d$(128):e(8):321A+(lev>2) @Jf=15+3*(lev>2):b(f)=1:a(f),d(f),e(f):f A~1,5,1,2,10 ,2,2,15,2,3,20,5,4,25,10 C1,4,1,2,7,2,2,10 ,2,3,13 ,5,4,16,10 ,5,19,20,5,22,20,6,25,502 E0330J:f=16:a$(f),b$(f):f: OC" "," "," "," "," "," "," "," ","","","","" &6:1:0:5: h1;15,2;"";15,29;"":f=328:1;15,f;"":f 416+(lev>2) of=15+3*(lev>2):e$,f$:1-b(f);6;16,d(f);e$;17,d(f);f$:f ya$(1),b$(1),a$(2),b$(2),a$(2),b$(2),a$(3),b$(3),a$(4),b$(4) a$(1),b$(1),a$(2),b$(2),a$(2),b$(2),a$(3),b$(3),a$(4),b$(4),a$(5),b$(5),a$(5),b$(5),a$(6),b$(6) d1;16,2;"";17,2;"";16,29;"";17,29;"" "" (0;5;18,0;d$ )f=15+3*(lev>2) (8lev>2)+(40(-16*(lev>2))*f,32 :22,0:0,15:-22,0:0,-15:f  >lev>231+24*wp,32 :0,15 >lev<323+40(*wp,32 :0,15 H1;1;6;16,d(wp);" ";17,d(wp);" "   500 a0,a1,a2,a3,a4,a5,a6 ?64@,159,128,0,16,2,1  %a0,a1:a2,a3:a3,-a4:a0,a1:a3,-a4 a0,144:32 ,-16:0,-480:a0,144:-32 ,-16:0,-480:a0,a3,.9ffff:-a0,a3:a0,a3,1:-a0,a3,-.9ffff:2,-1:60<,a3 192,144:32 ,-16:0,-480:192,144:-32 ,-16:0,-480:a0,a3,.9ffff:-a0,a3:a0,a3,1:-a0,a3,-.9ffff:2,-1:60<,a3 )f=313 :f,15;"":f )5;14,13 ;"LEVEL";lev #'128,143:0,16 N b23299[,a3:a=a3a4-a6:a0,a1-a:a2,a3+a5*a:10 -a/2:a6;a0,a1-a:a6;a2,a3+a5*a:a0+a2,a1+a:60000`:a la0,a1-a4:a2,a3+a5*a4:a3,-a6 v 23299[,a3 Ta=-a4a4-a6:a0,a1-a:a2,a3+a5*a:10 -a/2:a6;a0,a1-a:a6;a2,a3+a5*a [a0+a2,a1+a:a0;64@,159:60000`:a0;64@,159:a !a0,a1-a4:a2,a3+a5*a4:a3,-a6: 23299[,a3 Ra=-a4-a6:a0,a1-a:a2,a3+a5*a:10 -a/2:a6;a0,a1-a:a6;a2,a3+a5*a Ea0+a2,a1+a:64@,159:60000`:64@,159:a ,64@,158:a0,a1:a2,a3:a3,-a6: 23299[,a6 Ra=a3a4-a6:a0,a1+a:a2,a3-a5*a:10 -a/2:a6;a0,a1+a:a6;a2,a3-a5*a a0,a1+a:60000`:a a0,a1+a4:a2,a3-a5*a4:a3,-a6  23299[,a6 ]a=-a4a4-a6:a0,a1+a:a2,a3-a5*a:10 -a/2:a6;a0,a1+a:a6;a2,a3-a5*a:a0,a1+a Qa0;192,159:60000`:a0;192,159:a !a0,a1+a4:a2,a3-a5*a4:a3,-a6:  23299[,a6  Ra=-a4-a6:a0,a1+a:a2,a3-a5*a:10 -a/2:a6;a0,a1+a:a6;a2,a3-a5*a Da0,a1+a:192,159:60000`:192,159:a a0,a1:a2,a3:a3,-a6:  1400x nw=nw+1  y=5+3*(ps=2) Qx=12 -(2*tlps=1)-(2*trps=2)-4*(sp=2) R(tl=4ps=1)(tr=4ps=2)x=12 -4*(sp=2) x,y;a$(n);x+1,y;b$(n) i8*y,160-8*x:23,0:0,15:-23,0:0,-15 0ps=1tl=tl-(4tl=4)+1  0ps=2tr=tr-(4tr=4)+1  "ps=1c(1,tl)=e(wpi)  "ps=2c(2,tr)=e(wpi)  450   1400x =y=5+3*(e(wp)=c(2,tr)e(wp)c(1,tl)) )yx=14-(2*tle(wp)=c(1,tl))-(2*tr(e(wp)=c(2,tr)e(wp)c(1,tl)))-4*(sp=2) 3(1;x,y;a$(n);x+1,y;b$(n) 41:1;8*y,160-8*x:23,0:0,15:-23,0:0,-15:0 5;32 ,64@+32 *(sp=2):64@,0 88e(wp)=c(1,tl)c(1,tl)=0:1085= :,e(wp)=c(2,tr)c(2,tr)=0 = 450 Gnw=nw-1: Q z=0 V,5;18,0;d$:5:"" X7;1;18,0;" Press 5 to move pointer Left. ";6;" Press 8 to move pointer Right. ";7;" Press 7 to move a weight on. ";6;" Press 6 to move a weight off. " [T#1;7;1;"Pick a weight.";1;7;" Move it on / off." ^8100: bn=ni:wp=wpi e 1400x h81;2;7;15,d(wp)+1;"v" kVwp=16;1;15,d(5+3*(lev>2))+1;"" lVwp=5+3*(lev>2)6;1;15,d(1)+1;"" nYwp5+3*(lev>2)6;1;15,d(wp+1)+1;"" oCwp16;1;15,d(wp-1)+1;"" q"z0.05|L*so,20 rf=120:f t=""1140t y@z=:z<535z>568.1}L*so,-10 :1140t ~pnw6z=557b(wp)=1b(wp)=0:1000:.05|L*so,10 :.05|L*so,20: nw=01160 z=546b(wp)=0(e(wp)=c(2,tr)e(wp)=c(1,tl))b(wp)=1:1050:.05|L*so,20:.05|L*so,10 : Mz=568wpi=wpi+1:wpi=6+3*(lev>2)wpi=1 Mz=535wpi=wpi-1:wpi=0wpi=5+3*(lev>2) .z=535z=568ni=a(wpi):1120` /.5*so,-20:1650r:1140t  3kw=1+(*(19+80P*(lev>2))) rw=kw <23300[,228:23301[,235:60200( )kwt=(kw/10 ):kwu=kw-10 *kwt kwt=0cod=32 (kwt0cod=142+2*kwt Zlev=1lev=310 ,23;cod;11 ,23;(cod+(kwt0)) kwu=0cod=162 (kwu0cod=142+2*kwu Tlev=1lev=310 ,24;cod;11 ,24;(cod+1) 2lev=2lev=410 ,23;"??" ^175,80P:32 ,0:0,18:-32 ,0:0,-18 ;23300[,60<:23301[,235:60200(   lw=0 :f=12:g=13:lw=lw+c(f,g):g:f   1250 )lw>rwsp=2650:sp=1 ()lwtrtr=4)tl4)ps=2  t5;0;19,2;" This is a computer model of ";21,3;" a set of weighing scales." A1600@:1;2;18,0;d$:2:"" 1;2;7;20,0;" Do you need Instructions ?":#1;1;5;1;" Press ";6;" 'Y' for YES.";5;;" 'N' for NO."  8100 ""1461 =""1462 &="y"Ŧ="Y"inf=1:1470 ="n"Ŧ="N"inf=0: #.1}Lso,-10 :1462 51;2;18,0;d$:2:"" ç2;1;7;19,0;" There is a set of ";5+3*(lev>2);" weights";21,4;" which are shown above.":1600@ 51;1;18,0;d$:1:"" ͳ1;1;7;19,0;" The weights can be used to make ";21,0;" any total weight up to ";20+80P*(lev>2);" . ":1600@ 52;1;18,0;d$:2:"" ג7;1;2;19,0;" You can control the amount of ";21,0;" weight put into the left pan. ":1600@ =1;2;7;15,d(1)+1;"v" 51;1;18,0;d$:1:"" 1;7;1;19,0;" The flashing arrow can be moved";21,0;"to point at the weight you want.":1600@ 51;2;18,0;d$:2:"" 2;7;1;19,0;" Then if the weight is present ";21,0;"you can move it on to the scale.":1600@ 51;1;18,0;d$:1:"" 1;7;1;19,0;" You can also move weights off";21,2;" the scale if you need to.":1600@ 51;2;18,0;d$:2:"" 2;7;1;19,0;" Weights only come off the scale";21,0;" if they're on top of the pile.":1600@  E8100:100d Jd"":#1;1;1;6;1;" Press any key to continue. ":0:"": t#pn2=0+16*(sp=2) woz=557nw=6b(wp)=17;0,pn2;" SORRY! No room ";1,pn2;" on the scale. " |dz=546b(wp)=17;0,pn2;" SORRY!! Weight ";1,pn2;" not on scale. " z=546b(wp)=0(e(wp)=c(2,tr)e(wp)=c(1,tl))7;0,pn2;" SORRY!! Weight ";1,pn2;" not TOP of pile" dz=557b(wp)=07;0,pn2;" SORRY!! Weight ";1,pn2;"already on scale" f=1200:f:0,0+16*(sp=2);" ";1,0+16*(sp=2);" "  (6;1;18,0;d$ t3=t2-t1:u$=(" "t3<1000)+(" "t3<100d)+(" "t3<10 )+t3:1;7;0;0,0;" TIME TAKEN :- ";u$;" seconds. " >f=16:f:"":.03{u\so,5*f:5:f g=116 U1;7;14,2+(172*(g/2)=g);" BALANCED !" c6+(8so):6;14,2+(172*(g/2)=g);" " .05|Lso,10 +g .05|Lso,12 +g g >f=61-1:f:"":.03{u\so,5*f:f S1;1;7;18,0;d$;20,10 ;" Balanced ! " a"":#0;6;1;1;"'P' Print.";2;7;" Any other key- Go on." =""1759 ="P":'''':1758 %lev=1lev=31792 2:"":2;1;7;18,0;d$;19,0;" You should now know the value ";21,0;" of the mystery weight ! "  1600@ 1:"":1;7;1;18,0;d$;19,0;" Just add up the values of the ";21,0;" weights on the left-hand scale."  1600@ 2:"":2;1;18,0;d$;6;19,0;" What is the mystery weight ? ";2;7;21,0;"The mystery weight is ";5;" ";2;"units." &pn=21:cn=22:8000@ anskw0:"":0;7;1;18,0;d$;19,3;" SORRY ! ";ans;" is incorrect.";21,10 ;" TRY AGAIN !":.5so,-10 :10 :.73333so,-20:200:1775 6:"":1;6;1;1;18,0;d$;19,0;" Well Done ! Well Done ! Well Done ! Well Done ! ":"":#1;2;7;1;"The mystery weight was ";(" "kw<10 );kw;" units." @f=1502:.05|Lso,f:.05|Lso,502-f:f 26;10 ,23;(" "kw<10 );kw 1:"":1;1;7;18,0;d$;20,0;" Do you want another go ?":#1;6;1;1;" Press ";5;" 'Y' for YES.";6;" 'N' for NO.":8100 ""1793 =""1794 ="y"Ŧ="Y"ngo=1: ="n"Ŧ="N"ngo=0: #.1}Lso,-10 :1794 51;1;18,0;d$:1:"" lev=1lev=31;7;1;19,0;" Now a known weight will be ";21,0;" put on to the right scale.":1200:sp=2:700:1300:100d !(lev=1lev=3)2;1;18,0;d$:2:"":1;2;7;19,0;"Add weights to the left scale to";21,0;"balance the weight on the right.":400 &lev=2lev=41;7;1;19,0;" Now an unknown weight will be ";21,0;" put on to the right scale.":1200:sp=2:700:1300:100d (lev=2lev=46;18,0;d$:6:"":6;19,0;" You must balance the scales";21,0;" & so find the unknown weight.":300, +(lev=2lev=4)inf1;1;18,0;d$:1:"":1;1;7;19,0;" First add weights to the left ";21,0;" scale looking for a balance.":1600@ 0(lev=2lev=4)inf1;2;18,0;d$:2:"":2;7;1;19,0;" If you add too much weight ";21,0;" then take some weight off !":1600@ 5(lev=2lev=4)inf2;1;18,0;d$:2:"":2;1;7;19,0;" Soon you should get a balance ";21,0;" and so find the unknown weight.":1600@ 9 &5:1:0:1: n$=" " 6;1,6;n$;2,6;" There are 4 levels ";3,6;n$;4,6;" of difficulty. ";5,6;n$ 2:47/,168:162,0:0,-41),.2~L:-162,0:0,41),.2~L:0 'm$=" " 5;7,0;m$;"(";6;"1";5;")Match a given weight.(MAX 20)";m$;"(";6;"2";5;")Find a secret weight.(MAX 20)";m$ 5;12 ,0;"(";6;"3";5;")Match a given weight.(MAX 99)";m$;"(";6;"4";5;")Find a secret weight.(MAX 99)";m$ #n$=" " /0;1;16,0;n$+" " 0f=1721:6;f,0;m$:f n3;7;18,2;n$;19,2;" Select the level you want. ";20,2;n$  H#1;1;1;7;" Press 1 , 2 , 3 or 4. "  8100 =""2065 lev=-480 <lev<1lev>4.1}Lso,-10 :2065  8100 4 !1:2:"":5: G3;7;0,0;" INTRODUCTION to this Program. " If=417:4;f,3;" ":f S20:f=417:6;f,3;" ":f 6;6,3;" This Program is a ";9 ,3;" simple computer model";12 ,3;" of a set of";15,3;" Weighing Scales ." 3:0:23,31:209,0:0,113q,-.1}L:-209,0:0,-113q,-.1}L:9 :1 i100d:1;1;6;21,0;" Press any key to continue. ":0:"" C4:"":21,0;" " Gf=516:4;f,4;" ":f  20 Gf=516:3;f,4;" ":f 3;7;6,4;" It gives practice";9 ,4;" in selecting numbers ";12 ,4;" that add up to ";15,4;" a given total ." |7:31,39':193,0:0,97a,-.1}L:-193,0:0,-97a,-.1}L 0:23,31:209,0:0,113q,-.1}L:-209,0:0,-113q,-.1}L:9 :1 u8100:100d:1;1;6;21,0;" Press any key to continue. ":0:"" 621,0;" "  6:"" Gf=516:4;f,4;" ":f Q20:f=516:3;f,4;" ":f 3;7;6,4;" It also gives practice ";9 ,4;" in forming a strategy";12 ,4;" to find the value of";15,4;" an unknown weight." 7:31,39':193,0:0,97a,-.1}L:-193,0:0,-97a,-.1}L:9 !u8100:100d:1;1;6;21,0;" Press any key to continue. ":0:"" " 10:0:4:1::o=2 #o;1;5;"################################# ## ";1;" Balance Results. ";0;" ## #################################" 3gt=0:z$="********************************" H#o;5'z$;1;" Name. Level. Time. ";0;z$ ôf=1cc:#o;6;(f=2*(f/2));r$(f,15);3;7;r$(f,1620);6;0;r$(f,21):gt=gt+r$(f,2226):f m#o;5;z$:#o;'" ";1;" Average Time ";(10 *gt/cc)/10 ;" seconds.":o=3'''' m8100:"":#0;6;1;1;"'P' Print.";2;7;" Any other key- Go on." =""4070 ="P"o=3:4010 "":   cc=1r$(1)=t$: )t$r$(1)r=0:41506:  t$r$(cc-1)r$(cc)=t$: r=1cc-1 "'t$r$(r)t$i1:23,144:209,0:0,-25:-209,0:0,24 C15,80P:97a,0:0,-41):-97a,0:0,40(:135,80P:105i,0:0,-41):-105i,0:0,40( H 0 Rz$=" " W6;12 ,2;z$;13 ,2;" Press 'W' ";14,2;z$;15,2;" for WORK. ";16,2;z$ Z z$=z$+" " \6;12 ,17;z$;13 ,17;" Press 'R' ";14,17;z$;15,17;" for RESULTS.";16,17;z$ ^ 8100 _=""7263_ cz$=:z$="w"z$="W" p2z$"r"z$"R".2~L*so,-20:7263_ u:4000:7200  J"5:ans=0:pv=0 O""8015O T8=""1;1;pn,cn+3;"?":8020T ^sz$=:cz=z$:(cz<480cz13 )(cz>579cz114rcz82R).1}L*so,-20:8015O h<.1}L*so,20:cz=82Rcz=114r8080 mcz=13 8090 t+vz=z$:vz=0pv=08015O |;ans=10 *ans+vz:pn,cn+2-pv;ans:pv=pv+1 ppv=1"":#0;5;1;1;" R for rubout";2;" ";6;" ENTER if Finished" >pv>2.1}L*so,-20:pn,cn;" ":8010J  8015O pv=08010J <ans=(ans/10 ):pn,cn+2-pv;" ":pv=pv-1 $ans0pn,cn+3-pv;ans  8015O ?ans=0.1}L*so,-20:pn,cn;" ":8010J  4: so502: <.33(8120 >.58125 B.1}L,3:.1}L,5:.2~L,0:15: E.1}L,13 :.1}L,15:.2~L,10 :15: E.1}L,23:.1}L,25:.2~L,20:15: &4:1:4:0: #z$=" " f=0212:5;3;f,0;"":f 5;3,2;z$;4,2;" Do You want to have sound ";5,2;z$;6,2;" cues during this program ? ";7,2;z$ &i1:15,152:225,0:0,-41):-225,0:0,40( +23,80P:89Y,0:0,-41):-89Y,0:0,40(:143,80P:89Y,0:0,-41):-89Y,0:0,40(:0 :z$=" " ?6;12 ,3;z$;13 ,3;" Press 'Y' ";14,3;z$;15,3;" for YES. ";16,3;z$ D6;12 ,18;z$;13 ,18;" Press 'N' ";14,18;z$;15,18;" for NO. ";16,18;z$ G""8263G I=""8265I Kcz= S?cz89Ycz121ycz78Ncz110n8263G X&cz=89Ycz=121yso=1 ]&cz=78Ncz=110nso=0 b:8100: !7pn=16:cn=7 !;5:1:1: !Lq$=" ":f=410 :4;f,5;q$:f !Cq$=" ":f=59 :6;f,8;q$:f:6;6,10 ;"What is your";8,10 ;"name please ?" !HDpn,cn-5;"I am ":8100:w$="":lw=0:cap=0 !M""8525M! !R3=""1;1;pn,cn+lw;"?":8530R! !Wz$=:cz=z$ !\}(cz<65Acz32 cz13 cz480)(cz>90Zcz<97a)cz>123{.1}L*so,-20:8525M! !f/.1}L*so,20:cz=4808600! !h1cap=1lw=0cap=0:8630! !j2(cz=13 cz=32 )lw=08525M! !kcz=13 8620! !pcz=32 cap=1 !w$=w$+z$:lw=lw+1:pn,cn;w$:lw=1"":#0;1;5;1;" 0 for rubout";1;" ";6;" ENTER if Finished" !&lw>20lw=20:8620! ! 8525M! !cap=1cap=0 !lw=08525M! !2(w$(lw)>64@Ưw$(lw)<91[)cap=1 !Fw$=w$(lw-1):lw=lw-1:pn,cn+lw+1;" ":8525M! !Ox$(1,10 ):i$(1,lw):i$(1)=w$:x$(1)=i$(1) !0:5::f=1517:5;f,0;q$+q$:f:pn,11 -lw/2;" Hello ";i$(1);" !":8645!: !4(cz>96`cz<123{)cz=cz-32 :z$=cz ! !Ņf=117:23692\,-1:"":5;21,31;" ":.1}L*so,f:.05|L*so,f+7:5:f: #-Er$(502,32 ):cc=0:20:8200 :3000 #F 85004! #Pr2000:100d:300,:400:500:1450:1800:1100L:end=0:t1=t() #1120`:1300 #end9135# #t2=t():cc=cc+1 # 1700 #At$=" "+x$(1)+" "+lev+" "+u$+" secs.":4100 #ngo9040P# $"7200 :9030F# code X`^Zm!?"[>gx'''''o͛> !W[[ :[([[ "[$ > !?"[>gx'''''o> !W[[ :[ [[ "[% *[X~~ff8p`~~~~``|~f~<````````fffƆffff~~ff8p`~~|~><~| <f~<<~ffffffff~<