19.  Iterative Loops II: Do, For:  Problems

Last revision:  March 23, 1998

Author: YourNameGoesHere

Lots of Loons

Use a "Do[]" or "For[]" construct to compute the (1000^th) loon number.

Making a Nest

Use a "Do[]" or "For[]" construct to implement the function "iterNest[]", which should perform similarly to the Mathematica function "Nest[]".  Of course, don't use either "Nest[]" or "NestList[]".

Making a Product

Use a "Do[]" or "For[]" construct to implement the function "iterProduct[expr_, iterator_List]", which should perform similarly to the Mathematica function "Product[]".  Here is one example of the use of "Product[]":

3^2 * 5^2 * 7^2 * 9^2

Product[i^2,{i,3,9,2}]

Hint: Do not worry about what "expr" and "iterator" are; just pass them to the right place in the loop.