Is trying to program making you loopy...?
So we've discussed two of the main building blocks of programming: Data and Control Structures. With those, you can do things once for every time your program runs. Well what if you want to do more than once and done? Loops. As I've mentioned before, there are two basic kinds of loops. One kind runs a particular number of times that the program 'knows' in advance. The other type runs until some condition becomes true. That first kind is a For loop. Here is an example of how you would use one...Suppose you wanted to print out the numbers from one to one hundred. The pseudo-code: For the numbers 1 to 100 Print the number Sort of a trivial use though. How about if we want to also print out whether the number is even or odd: For the numbers 1 to 100 If the number is even Print the number and the word even Else Print the number and the word odd Did you just feel a twinge of excitement? The pieces are starting to come together... Let'...