Friday, February 24, 2006

I'd like you to continue to work on the program from yesterday. If you have completed the basic form of it, work on adding a while loop to allow you to repeat. DO NOT USE RECURSION! If you are having trouble with any part, ask your classmates for help. Travis has already completed this using a while loop.

There is a discussion of the while loop in chapter 6 of BoP.

If you get this done, read the end of chapter 5 in HtTLaCS. Starting at 5.6. These talk about recursion and calculations. They give a couple of great examples of recursion. Section 5.8 gives us a great way to make sure the input for a function is correct. Now we can use this statement with any input to be sure that we are getting an integer. We can compare the type to the type of an integer. This doesn't affect this program as much, but can be very useful at a later time.

No comments:

The OFFICIAL Dilbert Widget