<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Hi all<br>
    <br>
    A good algorithm to check student's skills. Only problem is that
    initial green and red values must be given.<br>
    Would include colour[4] values so as not to give the game away.<br>
    <br>
    Below is an example desk check - excuse the alignment Excel does not
    paste too well into an email<br>
    Have attached the spreadsheet which uses formulae to calculate
    values so you can change the initial values to something that will
    give one of the answers (I assumed colour values are from 0 to 255)<br>
    <br>
    <table width="1295" border="0" cellpadding="0" cellspacing="0">
      <col style="width: 68pt;" width="90"> <col style="width: 239pt;"
        width="319"> <col style="width: 57pt;" width="76" span="8"> <col
        style="width: 48pt;" width="64" span="2"> <col style="width:
        65pt;" width="86"> <col style="width: 48pt;" width="64"> <tbody>
        <tr style="height: 18.75pt;" height="25">
          <td colspan="14" class="xl66" style="height: 18.75pt; width:
            972pt;" width="1295" height="25">Sample desk check</td>
        </tr>
        <tr style="height: 18.75pt;" height="25">
          <td colspan="2" class="xl66" style="height: 18.75pt;"
            height="25">algorithm</td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
          <td class="xl66"><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl64" style="height: 15pt;" height="20">Line number</td>
          <td class="xl64">Step</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">1</td>
          <td class="xl63">BEGIN</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">2</td>
          <td class="xl63">SET TOTAL TO 0</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">3</td>
          <td class="xl63">SET COUNTER TO 1</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">4</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">5</td>
          <td class="xl65">TOTAL = TOTAL + COLOUR [COUNTER] . GREENVALUE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">6</td>
          <td class="xl65">ADD 1 TO COUNTER</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">7</td>
          <td class="xl63">ENDWHILE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">8</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">9</td>
          <td class="xl65">TOTAL = TOTAL + COLOUR [COUNTER] . REDVALUE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">10</td>
          <td class="xl65">ADD 1 TO COUNTER</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">11</td>
          <td class="xl63">ENDWHILE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">12</td>
          <td class="xl63">PRINT TOTAL</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">13</td>
          <td class="xl63">END</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" height="20"><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" height="20"><br>
          </td>
          <td><br>
          </td>
          <td class="xl64">colour[1]</td>
          <td class="xl64">colour[2]</td>
          <td class="xl64">colour[3]</td>
          <td class="xl64">colour[4]</td>
          <td class="xl64">colour[1]</td>
          <td class="xl64">colour[2]</td>
          <td class="xl64">colour[3]</td>
          <td class="xl64">colour[4]</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl64" style="height: 15pt;" height="20">Line number</td>
          <td class="xl64">Step</td>
          <td class="xl64">.greenvalue</td>
          <td class="xl64">.greenvalue</td>
          <td class="xl64">.greenvalue</td>
          <td class="xl64">.greenvalue</td>
          <td class="xl64">.redvalue</td>
          <td class="xl64">.redvalue</td>
          <td class="xl64">.redvalue</td>
          <td class="xl64">.redvalue</td>
          <td>total</td>
          <td>counter</td>
          <td>result of test</td>
          <td>output</td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" height="20"><br>
          </td>
          <td>initial values</td>
          <td align="right">47</td>
          <td align="right">79</td>
          <td align="right">19</td>
          <td align="right">133</td>
          <td align="right">95</td>
          <td align="right">208</td>
          <td align="right">93</td>
          <td align="right">40</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">1</td>
          <td class="xl63">BEGIN</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">2</td>
          <td class="xl63">SET TOTAL TO 0</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">0</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">3</td>
          <td class="xl63">SET COUNTER TO 1</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">1</td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">4</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="center">TRUE</td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">5</td>
          <td class="xl63">TOTAL = TOTAL + COLOUR [COUNTER] . GREENVALUE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">47</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">6</td>
          <td class="xl63">ADD 1 TO COUNTER</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">2</td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">4</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="center">TRUE</td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">5</td>
          <td class="xl63">TOTAL = TOTAL + COLOUR [COUNTER] . GREENVALUE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">126</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">6</td>
          <td class="xl63">ADD 1 TO COUNTER</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">3</td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">4</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="center">TRUE</td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">5</td>
          <td class="xl63">TOTAL = TOTAL + COLOUR [COUNTER] . GREENVALUE</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">145</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">6</td>
          <td class="xl63">ADD 1 TO COUNTER</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">4</td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">4</td>
          <td class="xl63">WHILE COUNTER &lt; 4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="center">FALSE</td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">8</td>
          <td class="xl63">WHILE COUNTER &lt;4</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="center">FALSE</td>
          <td><br>
          </td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td class="xl67" style="height: 15pt;" height="20">12</td>
          <td class="xl63">PRINT TOTAL</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td align="right">145</td>
        </tr>
        <tr style="height: 15pt;" height="20">
          <td style="height: 15pt;" align="right" height="20">13</td>
          <td class="xl63">END</td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
          <td><br>
          </td>
        </tr>
      </tbody>
    </table>
    <br>
    Mike Brookes<br>
    Semi retired gentleman of leisure<br>
    Copperfield College <br>
    <br>
    On 25/05/2011 11:43 AM, Brett Groves wrote:
    <blockquote cite="mid:4DDC5EAC.4040207@edumail.vic.gov.au"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <title></title>
      Hi all,<br>
      <br>
      Wondering if some kind soul who is good with desk checks / pseudo
      code can help me out here. We are about to commence OC2 (running a
      week late) and I have given my students some algorithms to
      evaluate for revision. On one in particular I realised I made an
      error of logic when evaluatiing it myself and have now confused my
      self to point of frustration. It's the one below. It has two count
      loops which it uses to select data in an array but they both have
      identical conditions. As I am currently reading it values will
      never be passed to the second loop as the evaluation condition
      that ends the first loop will also end the second???? Scratches
      head......sure I'm failing to see obvious! Can anyone help pls<br>
      <br>
      Brett<br>
      <style type="text/css">p { margin-bottom: 0.21cm; }</style>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small><b>Question 12:</b></small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>The following diagram shows the
                    contents of an array of records used for mixing
                    colours.</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>The name of the array is
                    &#8216;COLOUR&#8217;.</small></small></font></font></small></small></p>
      <small><small><font face="Garamond, serif"><font style="font-size:
              11pt;" size="2"><small><small>The algorithm below is used
                  to calculate colour values, using an array.</small></small></font></font></small></small>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>BEGIN</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>SET TOTAL TO 0</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>SET COUNTER TO 1</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>WHILE COUNTER &lt; 4</small></small></font></font></small></small></p>
      <p style="margin-left: 1.27cm; text-indent: 1.27cm; margin-bottom:
        0cm;" lang="en-US"><small><small> <font face="Garamond, serif"><font
                style="font-size: 11pt;" size="2"><small><small>TOTAL =
                    TOTAL + COLOUR [COUNTER] . GREENVALUE</small></small></font></font></small></small></p>
      <p style="margin-left: 1.27cm; text-indent: 1.27cm; margin-bottom:
        0cm;" lang="en-US"><small><small> <font face="Garamond, serif"><font
                style="font-size: 11pt;" size="2"><small><small>ADD 1 TO
                    COUNTER</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>ENDWHILE</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>WHILE COUNTER &lt; 4</small></small></font></font></small></small></p>
      <p style="margin-left: 1.27cm; text-indent: 1.27cm; margin-bottom:
        0cm;" lang="en-US"><small><small> <font face="Garamond, serif"><font
                style="font-size: 11pt;" size="2"><small><small>TOTAL =
                    TOTAL + COLOUR [COUNTER] . REDVALUE</small></small></font></font></small></small></p>
      <p style="margin-left: 1.27cm; text-indent: 1.27cm; margin-bottom:
        0cm;" lang="en-US"><small><small> <font face="Garamond, serif"><font
                style="font-size: 11pt;" size="2"><small><small>ADD 1 TO
                    COUNTER</small></small></font></font></small></small></p>
      <p style="text-indent: 1.27cm; margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>ENDWHILE</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>PRINT TOTAL</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>END</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><br>
          </small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>What will be the output of this
                    algorithm?</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>(A) 10</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>(B) 11</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>(C) 18</small></small></font></font></small></small></p>
      <p style="margin-bottom: 0cm;" lang="en-US"><small><small><font
              face="Garamond, serif"><font style="font-size: 11pt;"
                size="2"><small><small>(D) 25</small></small></font></font></small></small></p>
      <br>
      <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>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
<a class="moz-txt-link-freetext" href="http://www.edulists.com.au">http://www.edulists.com.au</a> - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
<a class="moz-txt-link-freetext" href="http://www.vcaa.vic.edu.au">http://www.vcaa.vic.edu.au</a> - Victorian Curriculum and Assessment Authority and
<a class="moz-txt-link-freetext" href="http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html">http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html</a> 
<a class="moz-txt-link-freetext" href="http://www.vitta.org.au">http://www.vitta.org.au</a>  - VITTA Victorian Information Technology Teachers Association Inc</pre>
    </blockquote>
    <br>
  </body>
</html>