Wednesday, March 24, 2010

Lab and homework #11

1) Using functions you write yourself,
draw an American flag on the screen. Don't worry about setting the colors, although I will update with instructions of how to change the colors.

2) Write a function which will take a number and print out all the factors of that number.

3) Write a function factorial, which will take a number n and *return* n factorial. Hint: use a for loop for this, with an accumulator.

No comments:

Post a Comment