[Year 12 SofDev] CSE/IARTV SD exam - question C4c

Mark KELLY kel at mckinnonsc.vic.edu.au
Mon Oct 17 14:59:03 EST 2011


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 "valid" because the last
digit of the total (zero) is 0!


On 17 October 2011 14:41, Mark KELLY <kel at mckinnonsc.vic.edu.au> wrote:

> The C4c question expects students to find the logical error relating to the
> odd/even digit logic mixup, but there's another big logical problem with the
> pseudocode that several of my kids detected.
>
> The "Total = Total + 2 * digit" line is adding the digit times 2 (e.g.
> 7*2=14) instead of adding the individual *digits* of the calculation (1,4)
> so the total is way off !
>
> My better kids found that error and didn't deign to mention the bleeding
> obvious one that they were intended to find.  I gave them bonus marks  :-)
>
> --
> Mark Kelly
> Manager of ICT, Reporting, IT Learning Area
> McKinnon Secondary College
> McKinnon Rd McKinnon 3204, Victoria, Australia
> Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253
> kel at mckinnonsc.vic.edu.au
> VCE IT Lecture Notes: http://vceit.com
> Moderator: IT Applications Edulist <http://www.edulists.com.au/>
>
> Want a good time? Call 0112358. Ask for Mr Fibonacci.
>



-- 
Mark Kelly
Manager of ICT, Reporting, IT Learning Area
McKinnon Secondary College
McKinnon Rd McKinnon 3204, Victoria, Australia
Direct line / Voicemail: +613 8520 9085, Fax +613 9578 9253
kel at mckinnonsc.vic.edu.au
VCE IT Lecture Notes: http://vceit.com
Moderator: IT Applications Edulist <http://www.edulists.com.au/>

Want a good time? Call 0112358. Ask for Mr Fibonacci.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20111017/8f143a52/attachment.html 


More information about the sofdev mailing list