Another of my (less able!) students found a third logic fault in the code.  If the CC number is all zeroes, it comes through as &quot;valid&quot; because the last digit of the total (zero) is 0!<br><br><br><div class="gmail_quote">

On 17 October 2011 14:41, Mark KELLY <span dir="ltr">&lt;<a href="mailto:kel@mckinnonsc.vic.edu.au">kel@mckinnonsc.vic.edu.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

The C4c question expects students to find the logical error relating to the odd/even digit logic mixup, but there&#39;s another big logical problem with the pseudocode that several of my kids detected.<br><br>The &quot;Total = Total + 2 * digit&quot; line is adding the digit times 2 (e.g. 7*2=14) instead of adding the individual <b>digits</b> of the calculation (1,4) so the total is way off ! <br>


<br>My better kids found that error and didn&#39;t deign to mention the bleeding obvious one that they were intended to find.  I gave them bonus marks  :-)<br clear="all"><font color="#888888"><br>-- <br>Mark Kelly<br>Manager of ICT, Reporting, IT Learning Area<br>


McKinnon Secondary College<br>McKinnon Rd McKinnon 3204, Victoria, Australia<br>Direct line / Voicemail: <a href="tel:%2B613%208520%209085" value="+61385209085" target="_blank">+613 8520 9085</a>, Fax <a href="tel:%2B613%209578%209253" value="+61395789253" target="_blank">+613 9578 9253</a><br>

<a href="mailto:kel@mckinnonsc.vic.edu.au" target="_blank">kel@mckinnonsc.vic.edu.au</a><br>
VCE IT Lecture Notes: <a href="http://vceit.com" target="_blank">http://vceit.com</a><br>Moderator: <a href="http://www.edulists.com.au/" target="_blank">IT Applications Edulist</a><br><br><font>Want a good time? Call 0112358. Ask for Mr </font>Fibonacci.<br>



</font></blockquote></div><br><br clear="all"><br>-- <br>Mark Kelly<br>Manager of ICT, Reporting, IT Learning Area<br>McKinnon Secondary College<br>McKinnon Rd McKinnon 3204, Victoria, Australia<br>Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253<br>

<a href="mailto:kel@mckinnonsc.vic.edu.au" target="_blank">kel@mckinnonsc.vic.edu.au</a><br>VCE IT Lecture Notes: <a href="http://vceit.com" target="_blank">http://vceit.com</a><br>Moderator: <a href="http://www.edulists.com.au/" target="_blank">IT Applications Edulist</a><br>

<br><font>Want a good time? Call 0112358. Ask for Mr </font>Fibonacci.<br>