<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.EmailStyle20
        {font-family:"Arial","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></a></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Hi folks,</span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; 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’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></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">The algorithm works on the assumption that we essentially start by looking at IngredientID =2 which gives the result of zero</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Then on the next pass we look at IngredientID = 3 which gives the result of 2</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Then on the last pass we look at IngredientID = 4 which doesn’t exist, so it returns a null value.
</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">The examiner report says the answer would be 0, 0, 2 which I don’t get.
</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">I’m not sure if I’ve spent too long staring at these things and am chasing ghosts. Any help would be appreciated</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Thanks</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Damien</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"><img width="731" height="557" id="Picture_x0020_2" src="cid:image003.png@01CC8CC4.F3BB5180"></span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"><img width="963" height="386" id="Picture_x0020_3" src="cid:image005.png@01CC8CC4.F3BB5180"></span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Examiners report</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"><img width="1023" height="348" id="Picture_x0020_1" src="cid:image007.png@01CC8CC4.F3BB5180"></span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span></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:"Arial","sans-serif"; color:#1F497D">Damien Atkinson-Buck</span></b><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"><br>
Member of Academic Staff (Secondary)</span><span style="color:#1F497D"></span></p>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">
<hr size="2" width="500" align="left" style="width:375.0pt">
</span></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:image008.jpg@01CC8CC3.19283AC0" alt="Description: Description: cid:image002.jpg@01CA7D93.5FFD22D0"></span></a><span style="font-size:12.0pt; color:#1F497D"></span></p>
</td>
<td width="5" style="width:3.75pt; padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="color:#1F497D"> </span><span style="font-size:12.0pt; color:#1F497D"></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:7.5pt; font-family:"Arial","sans-serif"; color:#1F497D">PO BOX 91 The Ridgeway, Ivanhoe, Victoria 3079 Australia<br>
Telephone +61 3 9490 3848 Facsimile +61 3 9490 3490<br>
</span><a href="mailto:damien.atkinson-buck@ivanhoe.com.au"><span style="font-size:7.5pt; font-family:"Arial","sans-serif"">mailto:damien.atkinson-buck@ivanhoe.com.au</span></a><span style="font-size:7.5pt; font-family:"Arial","sans-serif"; color:#1F497D"><br>
</span><a href="http://myivanhoe.net/"><span style="font-size:7.5pt; font-family:"Arial","sans-serif"">http://myivanhoe.net</span></a><span style="font-size:12.0pt; color:#1F497D"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </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:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> 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></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hope this helps, just chucked in all the answers from your website Mark.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </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 <b><i></i></b></span></p>
<p class="MsoNormal"><span style=""><img border="0" width="305" height="48" id="Picture_x0020_7" src="cid:image009.jpg@01CC8CC3.19283AC0" alt="Description: Description: Description: LogoTemplate"></span></p>
<p class="MsoNormal"><b><span style="font-size:8.5pt; color:#0A2478"> </span></b></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: +61 3 5278 9999 Fax: +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&sll=-25.335448,135.745076&safe=on&ie=UTF8&q=Kardinia+International+College,+2+Kardinia+Drive,+Bell+Post+Hill+Victoria+3215&fb=1&gl=au&hq=Kardinia+International+College,+2+Kardinia+Drive,+Bell+Post+Hill+Victoria+3215&hnear=Kardinia+International+College,+2+Kardinia+Drive,+Bell+Post+Hill+Victoria+3215&view=map&cid=18333593491172431013&ll=-38.109438,144.327704&spn=0.00531,0.011319&t=h&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><b><span style="font-size:8.5pt; color:#00194C"></span></b></p>
<p class="MsoNormal"> </p>
</div>
<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.
</body>
</html>