Originally posted by Vicken Karaoghlanian:
Using loops doesn't make your code more efficient (quicker), it simply make it more dynamic, readable and easy to write.
Perhaps I was incorrect, but I assumed (ya I know) that Sean meant "quicker" as in "quicker to type and debug" since he first asked for the "easiest" way and he didn't post it in the Performance forum.
That he abbreviated the formula said to me, "Do I really need to type out each of the nine array entries?" To that I say, "No, not in general." Were this going to run in a performance-critical loop, calculating the mean of twenty million sets of 9 grades I might consider expanding it out.
But hey, it kicked off a good discussion so I suppose assumptions aren't
always bad.