<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.balloontextchar0
        {mso-style-name:balloontextchar;
        font-family:"Tahoma","sans-serif";}
span.emailstyle19
        {mso-style-name:emailstyle19;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.emailstyle20
        {mso-style-name:emailstyle20;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Damien,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I think you&#8217;re all fine except that &#8220;Until Ingredient_ID = Num_Ingredients&#8221; in the fourth last line. As Num_Ingredients is 3 this means the last pass is IngredientID3 rather than 4.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;Qty1 was set to zero when the array was set up.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Hope this helps<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Heath<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> sofdev-bounces@edulists.com.au [mailto:sofdev-bounces@edulists.com.au]
<b>On Behalf Of </b>ATKINSON-BUCK, Damien<br>
<b>Sent:</b> Monday, 17 October 2011 12:05 PM<br>
<b>To:</b> Year 12 Software Development Teachers' Mailing List<br>
<b>Subject:</b> Re: [Year 12 SofDev] Past SD exams - pseudocode algorithms with errors - a collection - Updated with answers<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></a><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi folks,</span><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Can someone please help me out with q3b from the 2007 exam. Below is the algorithm, the question and the answers from the examiner&#8217;s
 report. Even taking into account that the examiners switched the array indexes in the question, I still have issue when I desk check.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">The algorithm works on the assumption that we essentially start by looking at IngredientID =2 which gives the result of zero</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Then on the next pass we look at IngredientID = 3 which gives the result of 2</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Then on the last pass we look at IngredientID = 4 which doesn&#8217;t exist, so it returns a null value.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">The examiner report says the answer would be 0, 0, 2 which I don&#8217;t get.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">I&#8217;m not sure if I&#8217;ve spent too long staring at these things and am chasing ghosts. Any help would be appreciated</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Damien</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><img width="731" height="557" id="Picture_x0020_2" src="cid:image001.png@01CC8CD7.34B3FD10"></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><img width="963" height="386" id="Picture_x0020_3" src="cid:image002.png@01CC8CD7.34B3FD10"></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Examiners report</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><img width="1023" height="348" id="Picture_x0020_1" src="cid:image003.png@01CC8CD7.34B3FD10"></span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">Damien Atkinson-Buck</span></b><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>
Member of Academic Staff (Secondary)</span><o:p></o:p></p>
<div>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">
<hr size="2" width="500" style="width:375.0pt" align="left">
</span></div>
</div>
</div>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="696" style="width:522.0pt">
<tbody>
<tr>
<td width="164" style="width:123.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="http://myivanhoe.net/"><span style="text-decoration:none"><img border="0" width="200" height="64" id="Picture_x0020_4" src="cid:image004.jpg@01CC8CD7.34B3FD10" alt="Description: Description: cid:image002.jpg@01CA7D93.5FFD22D0"></span></a><o:p></o:p></p>
</td>
<td width="5" style="width:3.75pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">PO&nbsp;BOX&nbsp;91 The Ridgeway, Ivanhoe, Victoria 3079 Australia<br>
Telephone &#43;61 3 9490 3848 Facsimile &#43;61 3 9490 3490<br>
</span><a href="mailto:damien.atkinson-buck@ivanhoe.com.au"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">mailto:damien.atkinson-buck@ivanhoe.com.au</span></a><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>
</span><a href="http://myivanhoe.net/"><span style="font-size:7.5pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">http://myivanhoe.net</span></a><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> Nate Morris [mailto:N.Morris@kardinia.vic.edu.au]
<br>
<b>Sent:</b> Thursday, 22 September 2011 3:39 PM<br>
<b>To:</b> sofdev@edulists.com.au<br>
<b>Subject:</b> [Year 12 SofDev] Past SD exams - pseudocode algorithms with errors - a collection - Updated with answers</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">Hope this helps, just chucked in all the answers from your website Mark.<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><i><span style="color:#17365D">Nate Morris<br>
</span></i><span style="color:#17365D">Senior Teacher </span><o:p></o:p></p>
<p class="MsoNormal"><img border="0" width="305" height="48" id="Picture_x0020_7" src="cid:image005.jpg@01CC8CD7.34B3FD10" alt="Description: Description: Description: LogoTemplate"><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:8.5pt;color:#0A2478">&nbsp;</span></b><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:8.5pt;color:#0A2478">Kardinia International College<br>
</span></b><b><span style="font-size:8.5pt;color:#17365D">PO Box 17, Geelong, Victoria, 3220, Australia<br>
Ph: &#43;61 3 5278 9999&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax:&nbsp; &#43;61 3 5278 9529</span></b><b><span style="font-size:8.5pt;color:#00194C"><br>
</span></b><span style="font-size:10.0pt">I</span><span style="font-size:8.0pt"> <a href="mailto:n.morris@kardinia.vic.edu.au">
n.morris@kardinia.vic.edu.au</a> </span><span style="font-size:10.0pt">I</span><span style="font-size:8.0pt">
<a href="http://maps.google.com.au/maps?hl=en&amp;sll=-25.335448,135.745076&amp;safe=on&amp;ie=UTF8&amp;q=Kardinia&#43;International&#43;College,&#43;2&#43;Kardinia&#43;Drive,&#43;Bell&#43;Post&#43;Hill&#43;Victoria&#43;3215&amp;fb=1&amp;gl=au&amp;hq=Kardinia&#43;International&#43;College,&#43;2&#43;Kardinia&#43;Drive,&#43;Bell&#43;Post&#43;Hill&#43;Victoria&#43;3215&amp;hnear=Kardinia&#43;International&#43;College,&#43;2&#43;Kardinia&#43;Drive,&#43;Bell&#43;Post&#43;Hill&#43;Victoria&#43;3215&amp;view=map&amp;cid=18333593491172431013&amp;ll=-38.109438,144.327704&amp;spn=0.00531,0.011319&amp;t=h&amp;z=17">
Click to find KIC</a> </span><span style="font-size:10.0pt">I</span><span style="font-size:8.0pt">
<a href="www.kardinia.vic.edu.au">www.kardinia.vic.edu.au</a> </span><span style="font-size:10.0pt">I</span><o:p></o:p></p>
<p class="MsoNormal">&nbsp;<o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><br>
<br>
<br>
<br>
Privacy, Virus and Copyright Warning<br>
<br>
The information contained in this electronic message (e-mail), and any files transmitted with it:<br>
<br>
* is intended for the named recipients only. If you have received this in error, please advise the sender and delete it and any copies immediately;<br>
* Any personal information in this email must be used in accordance with the Privacy Act 1988 and this always applies even if it has been sent to you in error.<br>
* represents the views of the sender and does not necessarily represent the views or formal advice of Ivanhoe Grammar School;<br>
* may be subject to Copyright, so no further use should be made of it without the author's permission.<br>
<br>
The School does not represent or warrant that the email or any files attached do not contain errors or are free from computer viruses or other defects nor does it accept responsibility for any loss or damage resulting directly or indirectly from the use of
 the email or any attached files. <o:p></o:p></span></p>
</div>
<p></p><p><b>Important - </b>This email and any attachments may be confidential. If received in error, please contact us and delete all copies. Before opening or using attachments check them for viruses and defects. Regardless of any loss, damage or consequence, whether caused by the negligence of the sender or not, resulting directly or indirectly from the use of any attached files our liability is limited to resupplying any affected attachments. Any representations or opinions expressed are those of the individual sender, and not necessarily those of the Department of Education and Early Childhood Development.</p>
</body>
</html>