top of page
  • Writer's pictureYang Xu

Week05 ICM



1. Organize the example Zoog portrait into functions so that you can understand what it’s doing without right comments and you can easily turn different parts of the sketch on/off by commenting in/out calls to your functions.

2. Take one of the functions from your re-factored Zoog portrait and re-write it so that you can call the same function twice and have it draw slightly different versions of the same thing. (e.g. Draw a big eye. Draw a little eye.) Alternatively you can try doing this on your own self-portrait.

3. Define a portable function that adds two numbers together and returns the sum. You should be able to copy and paste this function definition and only this function definition into a different sketch and use it without creating errors.

4. Re-organize your bouncing ball code from Week 3’s quiz into at least 2 functions.

Challenge: Create a reusable bounce() function that can be

10 views0 comments

Recent Posts

See All
bottom of page