lF{+0Fn**$X=<%hIv ***t*X)*eA f()xJI&Pͨ,$ |LKthe workspace #101 lessons& contains programs used in theKL$ t $$$newentry[recipe;1<'$\account v$Knew recipe filed.K$4lKthe running balance is K,-?data`44HKthe largest deposit is K,S/data4 paccount2 data lp>Knext item>K  4  T     4 <KiKKm sorry. the number was K,:ans",K.KFf<$dir[Lfread 2222 14$account2 L]:KyK%1Y"/1 .w g  ans[Q6i4ans[die2I@tie{;1' ֠lֈ@die2.w anss #$s.fwithd[withd,bucksfi$dw.check bucks@ebn{s.sfh(D@leichecks. s e$ anit;item<'=pr;item' $  dtpr[Lfread 277 3 ecnit[Lfread 277 2 90,totsale itemn ; Tnsa{elem\<T> mitemyy 00 totsale a e  rirprices=-/itemse $aceprices[Lfread 277 3$$7' items[Lfread 277 2e$[10totsales;1<T1<1{' ;8ل`<TG h bcom-/mats<(xtLmat[Lfread 277,compno:0( -Lctotal compno92 L[Ke{ :)?P(lxL LcompnoeELctotalmK o (` [KdirectryK Lftie 2222",((K,tKrecipesK Lftie 1111nam(nustiefilesl,KLier{1-RaX0 Ltotsalesbio s ( ;KexerciseK Lftie 277lK,( rrtie@ bt{ @ow tie 0te;Kthe number squared is K,x=x0nl,square x' @d  {܈ܤ@ rsquare KK $1`ofsb Lfmt:t<-/n<100"$d e44RK@Kr,cirfsb Lfmt:inames 4 l>K9a1,3cp#~&f12.2K Lfmt:n1:rpt dataRl6Td a{mberT<Tvetrptnp t  `cd-/matcma[vrowtot matR@ga {numb @[Lirowtotmmd , cm -?data:.%mruntot data@mmn{:1*-@ndaruntot 4. 4:R"K9a1,3cp#~&f12.2K Lfmt:n1reportm:0 R ,:1x,K K,x,K K,x,K K,x,K K,xke,h nrepeat xsam@;3'{3>]:t@-a0repeatY0a" K R ST 0 a l4t`nml3 ;3'l01(17ll4>Lfuntie 1111 2222a"/( 1]l02PIl3>addrecs[mad]l0' ll2>readrecsnus]l0$' ll1>listdirectory16 $,as[]:KlraqK%1Y"/l1,l2,l3,l4ms,Xas)l0>Klist recipes, read one, add new one, or quitQ :l, r, a, or q">K)a[X(pstiefilesoros<'recipesou {spec0\8$ nu[psrecipes20 ]  "N"Lfuntie 3371Ul2 es:Lfread 3371,ans :(bans[Lss4om Kwhat is the number of the recipeQK4(1>;KrecipesK Lftie 3371 pu(n.;read222h cm{ musp<$hp`aread2maed K $ifeLfread 1111,recno $recno[L4ftmKread which recipe :by number">Ko[04000readrecT { r[0pLT-=[readrec:r c IK  002=width=length0 ( 00width perimeter length0(@ 00{ 0 0|@\@salesman 0 0   00Lfread 277,data  00read data 0@ 00{ 0 0<@ 00read0 0 0 0 , 00:mon%m"/:snos%s"/;1' sales0, 00print 0@ 00{ 1 0@ 00print 0 0 0 IK$ 00r[2=width-length0 0$( 00r[width perim length @2(@8 4{9 21h@r[alength  K perim,b;8 width:d"+ 0 H,aLxRyr[,x of y @h{Xt@:7@yRa0  of  0 0 F(b[0:charvect*K K"/charvect(8381 removes blanks from character vector88$367noblank charvect'`a$L0  { ;L$b-Lperimeter 01noblank 0 1 $ 00:-/depos"_-/withd 1$ 01newbal1@ 01{ 0 1h(D@ 01newbal1 0 1 : 00m[num 0 00month num 1@ 01{ 0 1 @ 01month 1 0 1  01r[:a#b"/a 0 00r[a lt b0 1@ 01{ 0 1@ 01lt0 0 0  01dir$ 00dir[Lfread 2222 1 1$L 01{ 0;c#(XD L @ (leoKinventorK Lftie 1068 (invstart@<{H @charvect H ? iwithd[0L]:E{"RHl@ UHL lamount<;8 initbal = 0Ud;4' of KLK' Hd;3' of KLKHFnd;2' of KLKHFnd;1' of KLK,Lshist dG`{4lP,K`fm:d79_17histsts G ,,Knice to meet you, K,a,K.K,4a[4,Kmy name is jerry. whatKKs yoursQK4tsahellotT8{ dTtiehellocc : r[num=0.5fier[half num @imr{$x@fienumhalf $ 67$(Hok>Kright try againQK(]0Qans[Q3 etwnum[Leb,loop>Kenter your number>K,@ KiKKm thinking of a number between 1 and 3.K@guess2{48( \`ci4guess2$ 6 67 $,:ooknt$loop (*@Yok>Kright try againQK(r]0  eans[Q3 t unum[Lve,ntnloop>Kenter your number>K,@ 3sKiKKm thinking of a number between 1 and 3.Kd.K@guess(/NaJ{ss*p<  ` @ d guess 4 r[:a&b"/amdcm"r[a gt b0@r[_{[146T8@gtH  (name Lfreplace 1068 2((/a:name[name,;1' newnameas($l4name[Lfread 1068 2$getnameh{T0  h getname  ,idcdetails Lfreplace 1068 32U,,,Lftdetails[details,;1' newd st,xnewd[35Y LRKregistration number :if any", date purchased, and price>K2L(0& details[Lfread 1068 3((getdetailsh"{(|`4hinvstart? $ sales[Lfread 1076 3$$102mon[Lfread 1076 2b$$tapsnos[Lfread 1076 1($$ KsalesK Lftie 1076($r[tgetdata`Lc{< `(getdata moreE,Ktry againQ :yes or no">K,( more>::Q2"% 1 2"/;1' n((n[ 2 5 RKheadstailsK(Pflip2`{ ` 8!`Gflip2ռ  ,Ktry againQ :yes or no">Kt,$isf::Q2"% 1 2"/;1' nda$(vaun[ 2 5 RKheadstailsKrom(jauflip900`ere{the \8 !me`onaflip a $, iKnew sales filed.Kc$$roesales Lfappend 2201$daesales[L8icoKenter sales figures for this week>Knua8(KsalesfigK Lftie 2201(8 put new sales figures in sales filenc8|ret{e an!`! t\8!@|filesales n ifilerecipes8byt{hirdio8getdetails$e n $,.  Kdone. new recipe filed.Kr,(ntil2>recipe Lfappend 9971( te]l1,ityrecipe[recipe,;1' newlineut,( enewline[ 1 60 Rnewline.(( ]:)/KendK%3Ynewline"Rl2((ctorecipe[ 1 60 Rrecipeme (crsrecipe[60YHhetKenter your recipe line by line :use !end! to stop">Kt H(sclKrecipesK Lftie 9971e i(ds filereciper1 a{y 190|`8!!    ! Tfilerecipespa e )  :K K*s"/s@ te{ctio(\@filerecipe)d is sde a  t r[:a%b"/bwncesr[a eq bthe@set{the @edteqe. h $recKnew item filed.Kil$ri getdetails usvgetnameppnenterepT  {me ,lHTio enteridct n  frQ6cK> die@ene{as f T $ @@asndiena e 0ngmKprograms in the exercises.Kmma0LteeKthe book are included in this workspace, including theK vaLLabeKbook !apl is easy! :stsc, 1982". all programs shown inKsaLo .KK  fudescribe345h ra{ci >   T  heraseblankpa s #$ aldepos[depos,bucks 9$@t r{1234(| T p@etabucksmahaedepositdi y ix fore sh21streeK tdeetoousrtwos 2one btcount 1h e{rdci  x d P 8 h  count a7 2  rel-/;1' mat rtaucoltot mat @dc {678 \ $ @@ tematrercoltoteie d al a;b' rrooa choose b @{pres @ apbd,c.Kona,$ fedir[Lfread 2222 1is$t te{ted &\ &x t$ f$leelp$ fsb Lfmt:t<-/n<100"$ mrt[ 1 20 Rt ati44RK@Kd,fsb Lfmt:inamesKsha8 tebudget s r{al f40&xd8$'&X t H 0 &8   (nalbudgete g l r[:-/a"+Ra #r[avg2 a&@*{,@*:a;1?avg23Ar  l2avg data@{pT%@avgsalesxRthingx[L,Krepeat how many timesQKhow,thing[0Kenter thing to be repeated>K0$askrepeatK ,ngdline1>Q6(>]:askdie2T{xՐ\0 Taskdie2 a l1>Q6mmlueaskdie T,{հ)$ Taskdiecad line1fo)a/askdice2K.KThep{e al##$,)lTdescribe#1R " 0-/Q 6 6a"laskdiceTpas{s)m;p<X& LTRpsaskdice  0$Kthe average is K,:answer",K.K0m;avector[L&a8Kwhat numbers do you want to averageQK 8]:,askaverage `pas{s)m;\@%:0`askdice2l2l1>l1s(dir Lfreplace 2222 1([1n{ '*&#X)'"  p D HTԄ(dir[dir,;1' newentry460((l2>recipe Lfappend 1111(t]l1xrecipe[60Ydaddreci,addrecaskhist(nos[L` [adderK  0 ]:KyK%1Y"Rmore  -1 Knext line>K ,Lrecipe[recipe,;1' newline#,Td{lԨTaskaveragedata'`{h)#)D( )X|`accountadderv dnewline[60Y   S/v listdirectoryJ    `line1>-/Q 6 6 ]:KyK%1Y"Rl1 ,Ktry againQ :yes or no">K,33length error Ldef!Lfread !9,I74 ) !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ0Kenter numbers to be added>KP0 askhistKJ, pt[20YKtotalK Kbudget is>K newline[20Y l1>Knext line>K newentry[60Y" builddirectory! 0builddirectory HKenter your recipe line by line :use !end! to stop">KH<K 1981 1982 1983K <(newline[ 1 60 Rnewline(H$nums>Kenter budget figures for K,:1YRinames",K items>KH -?v<KiKKm sorry. the number was K,:ans",K.Ks>< eraseblank s* deposit bucks& HKdonKKt forget to "save if this is the final version.KH4Kenter four numbers for bar chart>K4,Ktry againQ :yes or no">K,D/v-/v$]:KyK%1Y"Rline1.sf$ (]:)/KendK%3Ynewline"Rl2(, Ldef!Lfread !9,!I74)x,(recipe[ 1 60 Rrecipe(0Kthe total is K,:-/nos",K.K0fi e  Ldm xe#"#D0","#,D|@,",P8$@(hL&DD4t x     h  8pT( #xT lpTL&8L  -` L8"t(| h( $h*@(E6PX (2t`?J\h(pKl,T<X0Lt4 ޤt!pFڼ\٠|ׄ_ּRxd=8%f9MG')74HgBAO.1e;D0:3><UZWIQaC5b`h^ STP+dVN /c]Y@[