ZXTape! 2vStudy Maths 2 - Side AScisoft1983English EducationalNoneOriginal&TZXed by Andrew Barker For Steve Brown0Lemonade StandLEMONADE 6 6@ 8 20:0::"":0,0;"":"" LE @6m6lmm6mmm6lmm6mmm mammammm mammammm6lmm6mmm6lmm6mm` ma lal` ma lalmm`6mmmmmm`6mmmm` ma lal` ma lalm amlaml` ma lalmmammlm amlamlm `mlalmmamml` alalm `mlal` ma lal` alalm amlaml` ma lalm6l`mmlm amlaml ` lalm6l`mml` alaml ` lalm mamlal` alamlm `mlamlm mamlalm6l`lmlm `mlaml` ma lalm6l`lml@~BB<@@fBbBD@@BBDbB@|ZBRBB|@BBBR@@@BBJ~B@@B~BJN@@BBFBD@@BBDFB~~BB<Ilemonade ]'o_LEMONADE "23609","50":"23658","8" ]A$(NF)=(N/100d)+(".0"N/100d=(N/100d))+("0"N/10 =(N/10 )) ,B(N="N)="N*(N-((N-2500)ƽN>2500))" d:"9E3":"7E3" nda=ç da=da+:we=(+*"10") "2E3":>".9""5E3" DA<"7"br"200" @"6000"::br''"You went broke after ";da;" days"''':"260" a=ç:n=̰"7":a=a+g(n):n:"5",ç;''"In this week you made a total"'("profit"aç);("loss"a<ç);" of `";a$(a)'''"Would you like to try another"'"week ? (press Y or N)" "9400":i$="Y""110" N''"Do you want to play again ?"'"(press Y or N).":"9400":i$="Y"  ^ڼ:ٰ"7":缧::ç,"43":ç,"132":"255",ç:ç,"-132":"-255",ç:ç,"156":"255",ç M,"7";"** SALES REPORT **";,"10";d$(da);"5",;"Weather :-";a$(we) "7",;"Cash in hand `";a$(mo);"9",;"Hire of stand ` ";a$(hi);" p per day";"17","2";"Lemonade costs you ";in;" p per";"18","2";"cup wholesale. How many";"19","2";"cups do you wish to buy in ?" G"9200":noɺno"21",ç;"Type in a whole number please.";:"2030" ma=no:ma*in>mo"9300":17,1;"You can only afford ";(mo/in);" cups !";19,1;"Please try again.":2030 R"9300":"11",;"Cost price ";in;"p per cup";"13",;ma;" cups made today."  M"17","2";"What price will you charge";"18","2";"per cup (in pence) ?" J"9200":pr=no:"9300":15,1;"Sale price ";pr;" p per cup"  S"19",;"Press ENTER to see your sales";"20","5";"for the day.":"9110" mڰ"2":ٰ"7":"2"::ç,"10";"** SALES **";"2","11";d$(da);"3","6";"Weather ";a$(we):so=ç:ti="8" ."4","6";"";"5","6";" Lemonade ";"5","28";"";"6","6";" price ";pr;"p per cup";"6","28";"";"7","6";" cups made ";ma;"7","28";"";"8","6";" time";"8","28";"";"9","6";" cups sold ";so;"9","28";"";"10","6";"" ̂"30","10":"200",ç:"30","10":ç,"100":n="36"̰"228"Ͱ"24":n,"9":ç,"3":n:n="10"̰"82"Ͱ"16":"28",n:,ç:n օ"21",;" 9 10 11 12 1 2 3 4 5";"7","2";""'" "'" "'" ";"12",ç;"100";''''" 50"''''" 0";#1;ç,"26";"" cs(3):n=13:s(n)="500-((500*pr)/(12+(4N2)+(8N=3)))":s(n)<0s(n)=ç &N :Isr=a(we)*(s(1)+s(2)+s(3)):"30","10":װ".1","12" t=̰"9" "ti=t+"8":ti>"12"ti=ti-"12" 5"8","19";ti;".00 ";("am "tǰ"4");("pm "t>"4") (ch="(t(t)*sr*(0.7+(((1+*6))/10)))" so=mach=ç ch>"100"ch="100" Iso=so+ch:somach=ma-(so-ch):so=ma:"9","8";"SOLD OUT !!! " so3)+(100r=5)":"9100": up="5*(1+*2)":hi=hi+up:"Due to financial difficulties"'"the hire firm for lemonade"'"stall holders regret they have"'"been forced to raise the hire"'"charge for their stalls by "'up;" pence to ";hi;" pence/day.": P}in="in+(1+*2)":"Due to the rise in inflation the"'"wholesalers have increased their"'"price per cup to ";in;" pence.": in="in-2":"A drastic fall in the price of"'"lemons means that LEMSALE are"'"able to sell you lemonade at thereduced price of ";in;" p per cup.": p_ڰ"7":ç:"7"::0,8;"SALES ANALYSIS"''"Profit & loss account." z"30","88":"220",ç:"30","28":ç,"120":n="28"̰"148"Ͱ"30":"28",n:,ç:n:n=̰"7":"19","4*n";d$(n)(̺):n:"3",ç;"`25";"18",ç;"-25" dn=̰"7":m=ç̰"7":ٰ"(2+(2g(n)0))";"8+32*n+m","88":ٰ"(2+(2g(n)0))";ç,".024*B(g(n))" m:n:"9100": Xڰ"6":ç:"6"::ç,"8";"Lemonade Stand";"4",ç;"This program is a simulation of running a small lemonade stand."''"Each day you must decide how"'"many cups of lemonade to make"'"and what your price per cup"'"will be for that day."''"The computer will then work out your sales and tell you how muchprofit you have made."''"At the end of a week the"'"computer will show how well"'"you did.":"9100": #(ں:ٰ"7":ç:ç:ç:ç:级::"5","12";:z$="Lemonade":v="32000":"8","13";:z$="Stand":v="32000":"16","10";" 1983" #2]a$(10 ,16):a(10 ):d$(7,9 ):d(7):t(9 ):g(8) #<N=̰"10":A$(N),A(N):N #F"ROADWORKS NEARBY",.3,"BAD WEATHER",.25~,"FAIR WEATHER",.5,"GOOD WEATHER",.8L,"HEATWAVE",1,"STORMY",.17~.z,"DRIZZLE",.22~aG,"COOL BUT DRY",.4L,"WARM AND MILD",.65&fff,"SUNNY",.9ffff #PN=̰"7":D$(N),D(N):N #Z"SATURDAY",1,"SUNDAY",1,"MONDAY",.8L,"TUESDAY",.73333,"WEDNESDAY",.55 ,"THURSDAY",.73333,"FRIDAY",.9ffff #doN=̰"9":T(N):N:.17~.z,.13~R,.07}\(,.11}aG,.09}8Q,.04|# =,.09}8Q,.17~.z,.13~R #n>br=ç:IN="8":MO="2000":HI="70":װ".2","24":"9100": #+"21","5";"Press ENTER to continue" #"""9110" #="""9120" #7"21","5";" ";:װ".2","12": #i$:i$="""9200" #F"21",ç;" ";:i1=ç:i2=ç:n=̱i$ $g(i$(n)<"0"i$(n)>"9")i$(n)" "(i$(n)"."i2)"21",ç;"Thats a funny number .Try again";:"9200" $i$(n)"0"i$(n)"9"i1= $i$(n)="."i2= $"n:I1"9200" $, NO=I$: $T?n="17"̰"21":n,ç;" ";:n: $"""9400" $i$=:i$"Y"i$"N""9410" $ 'eڰ"7":ç:"7":"31999"::"5","5";"STILL LOADING";"7","5";"PLEASE WAIT":"":"": 'I"lemonade"ʰ"9998":"lemonade""32000","200":"lemonade""a","22*8" vZStand ROADWORKS NEARBYBAD WEATHER FAIR WEATHER GOOD WEATHER HEATWAVE STORMY DRIZZLE COOL BUT DRY WARM AND MILD SUNNY 5 ~L~.z~aGL̀&fffffffD SATURDAY SUNDAY MONDAY TUESDAY WEDNESDAYTHURSDAY FRIDAY &L̀3333 ̀3333ffff0 ~.z~R}\(}aG}8Q|# =}8Q~.z~R+ d#Flemonade }o\f3*K\~Z`  #~( #^#V#}P:\G>!2}:\G>2}#N#F#x~f}# x o&)))<:}O:}G y >2}xg'''''o@w$<By P.W.Cookelemonade Xo իVjVj~""""ګ. @@@@ 0Estimate the Angleangle 'ESTIMATE THE ANGLE 9000(# 1score=0:oldscore=0:turn=1: 5000:instructions 1:7:1: b$="ESTIMATE THE ANGLE" (1,5;:6020 2b$="** "+a$+" **" <72,12 -(a$)/2;2;:6020 F"b$="Here are five angles to try" P3,2;:6020 Zg(5):a(5) dp=15 nh4,0;:n=118:" ":n:clear rest of the screen xb$="number "+p 4,1;:6020 angle=10 +5*(*(17+(18(turn>1oldscore>25))+(18(turn>2oldscore>25)))) first turn only gives angles up to 90 degrees. if good enough score second turn gives angles up to 180 and third gives angles up to 270 Sn=1p-1:a(n)=angle140:check we have nothd same angle before n a(p)=angle 6128,80P:64@,0:draw base line 1rad=angle*2*/360h:angle in radians "x=63?*rad:y=63?*rad *128,80P:x,y:draw other line fangle=90Z144,80P:0,16:-16,0:210:if a right angle 7144,80P:-16+x/4,y/4,rad t14,18;"TYPE IN YOUR";16,18;"GUESS AND THEN";18,18;"PRESS ";1;"ENTER" g$:guess ?g$=""220:error trapping routine (pressed enter only) alen=g$:g$(len)=" "g$=g$(len-1):230:error trapping routine (trailing spaces) mn=1len:g$(n)<480ůg$(n)>5794000:220:error trapping routine (not a number n  g(p)=g$ "20,0;" ";21,0;" ";:clear any error messages ,r14,18;" YOUR GUESS ";16,18;" ";g(p);" ";18,18;" " 6error=(angle-g(p)) ;score=score+10 -error =error56030 >error>40(6040 @,error=0b$="perfect. brilliant!!!" J-error>0error5b$="very good" T;error>5error10 b$="pretty good estimate !" ^7error>10 error20b$="not a bad guess !" h6error>20error40(b$="a fair way out !" r1error>40(b$="thats a pretty wild guess!" w6g(p)>360hb$="you can't have angles above 360" | 19,1;:6020 Y10 ,23;a(p);"";20,2;"the angle was ";1;a(p);" degrees" U21,0;7;2;"press enter ";("for the next angle"p<5) ""410 =""420 p 7:0::4 >0,0;"HERE IS A BAR CHART OF YOUR"'"ANSWERS ";A$ L568,16:104h,0:568,16:0,135 4,0;"angle" 6,0;"()" tn=027045-:(20-(n/16)),4;n:579,16+n/2:2,0:n &5n=15:20,5+3*n;n:n 020,25;"number" :|5,23;4;" your";6,25;"guess";8,23;2;" the";9 ,25;"angle" Xn=15 b g(n)>270g(n)=275 lm=03 v?40(+m+24*n,16:4;0,g(n)/2 m m=03 ?480+m+24*n,16:2;0,a(n)/2 m n 6000p:6010z ?2,4;1;1;"PRESS A KEY TO TRY AGAIN" turn=turn+1: oldscore=score score=0 ""730 =""740  20  sg$(n)=46.20,2;"no decimals please. I don't";21,2;"understand them! try again": f20,2;"thats a funny number. I don't";21,2;"understand. Please try again":  100d  1:7:1: '3,3;"ESTIMATE THE ANGLE" o5,1;"Please type in your first name"'" and then press the key marked"'10 ;1;"ENTER" Oa$:a$>248,1;"Just your first name please":5030 Kn=1̱a$:a$(n)>96`Ưa$(n)<123{a$(n)=(a$(n)-32 ) 4n:convert to capitals**************************** 10 ,1;"Hello ";a$ Y13 ,1;"Do you want instructions ?";15,5;"Press Y or N" ""5055 z$=:z$=""5060 z$="n"z$="N" ؆z$"y"z$"Y"0.2~L,0:0.2~L,-3:20,2;1;6;0;"please press y or n":5060 7:2:7: 01,7;1;"ESTIMATE THE ANGLE" O4,1;"In this game the computer will"''" show you an angle...."''  6010z:" like this..." 6000p:pretty tune K80P,568:70F,0:80P,568:502,502 22100d,568:-10 ,10 ,/4 < 6010z FS16,2;"You have to try and guess"''" what the angle is in degrees !" P 6010z Z821,1;"PRESS ENTER TO START THE GAME." d=""5220d n pK.4L,0:.4L,4:.4L,7:.4L,12 : zRn=1300,:n::main delay loop*************************************** nN=1̱b$:b$(n);:.02{# =,12 :m=18:m:n:: subroutine to display sentence slowly K.4L,5:.2~L,5:.2~L,5:.8L,12 : =.5,-12 :.5,-13 :1,-14: #(1:7:1::5,6;:Z$="Estimate the Angle":v=32000}:16,9 ;" Scisoft 1983";21,4;"Press ENTER to continue"; #213 90102# #< '31999|:7:1:7:0:0:0:0::5,5;1;"STILL LOADING";7,5;"LEAVE TAPE RUNNING":"":"": 'R"angle"9998':"angle"32000},200:"angle""a",22*8 ZEstimate the Anglevangle }P3*K\~Z`  #~( #^#V#}P:\G>!2}:\G>2}#N#F#x~f}# x o&)))<:}O:}G y >2}xg'''''o@w$<angle Xf??UUUUUUUժժUUUBfZBBBBbRJFB"6"1090B L z$="1"8000@:6000p `z$="2"points6000p e~Z$="2"POINTS:5,0;"You need to design a shape"''"before you can view it.":10 :9800H&:1000 jz$="3"2000 tz$="4"9000(# ~z$="5"3000  z$="6"  1000 change lines and points  !0,8;"GLASS DESIGN" 85,0;"The two variables you can changeare" B'"1 no of steps in horizontal direction now ";segments ?'"2 no of vertical lines now ";lines (''"press 1 2 or Q to quit"  *z$=:z$"1"z$"2"z$"Q"2060   z$="1"21004:2000  z$="2"2200:2000 * 4 >!"Change no of horizontal steps" H6''"A 6 steps"'"B 12 steps"'"C 18 steps"'"D 24 steps" R&''"press A,B,C or D" \!z$=:z$<"A"z$>"D"2140\ fQsegments=(6z$="A")+(12 z$="A")+(18z$="C")+(24z$="D") p)'"no of horizontal steps now ";segments z9800H&:  "Change no of vertical lines" 6''"A 6 steps"'"B 12 steps"'"C 18 steps"'"D 24 steps" &''"press A,B,C or D" !z$=:z$<"A"z$>"D"2240 Nlines=(6z$="A")+(12 z$="B")+(18z$="C")+(24z$="D") $'"no of vertical lines now ";lines 9800H&: change colours  #0,6;"Change colours" 15,0;"type in paper colour (0-7) "; !A$=:A$>"7"A$<"0"3025 a$:paper=a$ ""3035 210 ,0;"type in ink colour (0-7) "; !A$=:A$>"7"A$<"0"3050 a$:ink=a$ ink=paper17,0;1;"YOU CANT HAVE PAPER AND INK COLOURS THE SAME !! ":9800H&:3000 R17,0;"Paper ";paper;" ink ";ink:9800H&:23658j\,8  n odraw shape p z6;"GLASS DESIGN" 5,0;"What angle of tilt do you want to view at?"'"Type in any angle between 0 and 90 degrees and press ENTER" a$:a$=""6030 ^i1=0:i2=0:n=1̱a$:(a$(n)<"0"a$(n)>"9")a$(n)" "a$(n)"."6030 !a$(n)" "a$(n)"."i1=1 2a$(n)="."i2=i2+1:i2>16030 n:i16030 5angle=a$:angle<0angle>90Z6030 ''angle;" degrees" ""6060  9800H&  ,tiltx=6*(angle*2*/360h) ,tilty=6*(angle*2*/360h) n=1points g128+6*x(p(n,1),1),70F+tilty*y(p(n,1),1)+tiltx*p(n,2) m=2segments o6*(x(p(n,1),m)-x(p(n,1),m-1)),tilty*(y(p(n,1),m)-y(p(n,1),m-1)) m y6*(x(p(n,1),1)-x(p(n,1),segments)),tilty*(y(p(n,1),1)-y(p(n,1),segments)) n 8n=1lines Bm128+6*a(p(1,1),n),70F+tilty*b(p(1,1),n)+tiltx*p(1,2) Lm=2points V6*(a(p(m,1),n)-a(p(m-1,1),n)),tilty*(b(p(m,1),n)-b(p(m-1,1),n))+tiltx*((p(m,2)-p(m-1,2))) `m jn 9800H&: ?design side view @&:0,6;"** G L A S S **" J%0,38&:255,0 T+16,5;"t9876543210123456789t" ^Qn=012 :15-n,4-(n>9 );n;15-n,26;n:n h18,0;"Use cursor keys to move pointer P to plot next point Q to start again F to finish." p(12 ,2) points=0 x=0:y=0 %15-y,15+x;1;"" ""8210 z$=:z$=""8220 &lz$="8"z$="5"15-y,15+x;1;"":x=x+(z$="8"x<10 )-(z$="5"x>0):8200 0lz$="6"z$="7"15-y,15+x;1;"":y=y+(z$="7"y<12 )-(z$="6"y>0):8200 D'z$="P".1}L,24:8700! N&z$="Q".1}L,6:8000@ X$z$"F"points<12 8210 b[.1}L,32 :n=1820:n,0;" ";:n l:21,0;"press ENTER to see the 3-D shape" v""8310v =""8320   !%15-y,15+x;1;"" "Apoints=points+1:p(points,1)=x:p(points,2)=y "D21,15;points;" point"+("s"points>1);" plotted" "points>1n=-112:123{+8*n*p(points-1,1),524+8*p(points-1,2):8*n*(p(points,1)-p(points-1,1)),8*(p(points,2)-p(points-1,2)):n "$%15-y,15+x;1;"" ". #'instructions #( #2'0,6;"** GLASS DESIGN **" #!2}:\G>2}#N#F#x~f}# x o&)))<:}O:}G y >2}xg'''''o@w$<By P.W.Cookeglass XSUUUUUUUժժUUUBfZBBBBbRJFB