Week 4
Using the Pen Module and Creating Functions
Summary
This week we will work with one of the more powerful features of Scratch. Yet one you probably wouldn't discover on your own if you were just playing around.
You will be learning how to create functions, both with and without parameters. In addition, you will be exploring the pen module of Scratch which is a great tool but is considered an extension.
Key Concepts
Lessons
Like we did last week, before we start the full lecture videos, lets have you complete some TIPP&SEE activities. This week I want you to consider two programs that do the exact same thing but in a different way.
- Load version #1 of our Scratch program:
- Answer for yourself the TIPP questions
- Click on the "See Inside" button and consider the SEE actions
- For version #1 I would like you to just focus on trying to examine the code and see how it works.
- You are welcome to make changes to help you with this process, but we will also consider another version of this same program that I think is easier to comprehend.
- Now load version #1 of our Scratch program:
- Answer for yourself the TIPP questions
- Click on the "See Inside" button and consider the SEE actions
- What is different about this version from the first version?
- Why might this one be considered "easier" to read?
- Try to modify the program. Some suggestions include:
- The squares are smaller in size
- There are 24 triangles visible, not 12 (note, this will require two changes)
- The color of the triangles is green
- [Optional Challenge]The color of each triangle changes from the previous one.
Now that you have warmed up with some existing code, please watch the following videos which total approximately 60 minutes.
- 4.1 - Adding the Pen Extension
- 4.2 - [TASK] Square Tracer
- 4.3 - Solving Square Tracer
- 4.4 - Motivating and Writing our own functions
- 4.5 - Functions with a parameter
- 4.6 - Functions with multiple parameters
- 4.7 - Polygon Tracer
Assignment
When you have completed the instruction for this week, please complete this programming activity.