Friday, October 19, 2012

SOFT6008 Code

Looking at the solutions to the checksum exercises I noticed that for the PPSN and ISBN (old) a number of students use separate variables because they need to count up and count down at the same time. A cleverer solution figures out the relationship between the loop counter and the other variables, so that only one variable is required.

So if you got those working, try to make them excellent.

If they are giving you trouble, just go for working. And maybe think about it later.

In reality many Spaniards separate the check letter from the number with a -. You could consider accounting for this also.

If you are forcing the user's input to be uppercase, you might want to keep a copy of what they actually entered so that when it comes to giving feedback you can output exactly what they input.



Trivia Quiz:
156478214X was an Irish clue in which riddle?

No comments: