Intro CS Assignments
Assignments by week:
Fall Term:
Winter Term:
Spring Term:
Monday, September 24
Description
While Loops
Homework
  • Write a program that produces the result shown below (again, using a while, not cut and paste). Declare a variable for the number of boxes; your program should produce correct results for different numbers of boxes (without needing to edit any other code).

    Your browser does not support the canvas tag.

  • Read about the for statement in Processing.
  • Re-write the "Blast Off" program you wrote earlier using a for loop.
Tuesday, September 25
Description
For Loops
Homework
  • Using for or while loops, print(), and println() (you'll need all three!), write a program that prints out a "times table" for the numbers 1 through 10. Extra challenge: format the results so the columns line up nicely (samples below):
    "Basic" formatting: 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100 "Nice" formatting: 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100
Thursday, September 27
Description
Loop Practice
Homework
  • Study for your first test during next class. Anything we've learned through last week is fair game (see the reading assignments from previous weeks). Basically, everything except loops. Examples of questions I might ask include:
    • Sketch the drawing produced by some lines of code
    • Write the code to produce a specific drawing
    • Evaluate arithmetic expressions (like "x = 15 / 7")
    • Write short programs that draw shapes, access the size of the canvas, and the position of the mouse
    • Create colors
    • Use random numbers
Friday, September 28
Description
Test
Homework
  • Read the excerpt I sent to the class conference on functions. You do not need to complete the excersises at the end of the reading, but you are welcome to try them for practice!