[Year 12 SofDev] An algorithm puzzler for your kids (and you?)

Mark Kelly kel at mckinnonsc.vic.edu.au
Thu Mar 8 10:05:57 EST 2007


Whilst battling to get a database to calculate averaged VELS domain 
scores from dimension scores, I faced an interesting problem you might 
want to set your kids for tackling algorithms.  (A handy way of filling 
in a messy 5 excess minutes at the end of a period?)

Domain scores are rounded up to the nearest 0.25, so 4.01, 4.1 and 4.24 
become 4.25.  And 4.76 and 4.99 become 5.0.

I spent quite some time scribbling and testing with Excel to get it 
right.  The solution appears under my sig if you are interested.

The satisfaction I felt when I solved it reminded me of why I got into 
programming in the first place :-)

.
.
.
.
.
.
.
  thinking music
  .
.
.
.
.
.
.
  thinking music
.
.
.
.
.
.
.
  thinking music
.
.
.
.
.
.
.
  thinking music
.
.
.
.
.
.
.
  thinking music


-- 
Mark Kelly
Manager - Information Systems
McKinnon Secondary College
McKinnon Rd McKinnon 3204, Victoria, Australia
Direct line / Voicemail: 8520 9085
School Phone +613 8520 9000 << new number!
School Fax   +613 9578 9253

Webmaster - http://www.mckinnonsc.vic.edu.au
IT Lecture notes: http://vceit.com
Moderator: IPM Mailing List

Doctor - We must all face reality sooner or later.
Dowd   - I wrestled with reality for 35 years, doctor, and I'm happy to 
say I won out over it.  ('Harvey', 1950)


Solution: n + (0.25 - MOD(n,0.25))



More information about the sofdev mailing list