## Session 21 - Activity #7

Hands-on Function Activity

On Friday I asked you to watch a series of videos that taught you about building your own functions in scratch. If you have not viewed those yet, please do so know.

During this module we looked at constructing functions - blocks of code that you can call over and over again. For this assignment I would like you to create a program that uses a functions as part of a drawing package to draw simple scene such as a house. For example, here is a very basic solution with part of the code.

• “Slowly” (use some wait blocks so we can see the picture evolve) draw a scene on the stage using the pen tool. You may create any scene that you like, but if you are looking for an idea I propose that you draw a house like the kind a kid would draw when playing with crayons and markers.
• Include the definition and use of a “rectangle” function.
• While a square is a special kind of rectangle, most of us think of rectangles as different. That is, we think of them having a different width than height. Create a function called rectangle which takes in two parmaeters - a width and a height. These should be used in your function to draw the described rectangle.
• Include at least two functions beyond the required rectangle function and the ones we have created in our video lessons.
• In this module we created a function for a half circle, a square, and a general purpose polygon. You may use these as part of this assignment, but they do not count towards the use of three functions.
• These may include specific variations of the polygon function. For example, you can elect to use the polygon function to make your triangle or you can create a new, separate triangle function (just like we created a square function which was separate from the polygon function).
• Your functions need not be limited to standard polygons. You can create functions for anything that you want to explore.
• Pass the “Places Everyone” test.

• You need not draw a stick figure house. You can draw any scene that you like.
• Don't limit yourself to a '“stick figure” drawing elements (circles, squares, rectangles, circles, lines, etc. For example, you could make a “curly que” function that makes part a curly que used to draw the leaves in a tree.

#### Getting Credit for this Assignment

Make sure you have met all of the requirements listed above.

• “Share” your program publicly on the Scratch website by clicking on the share button in the upper right hand corner of the create screen.
• Make sure that both partner's usernames are in the credits.
• Navigate to the studio for this project - https://scratch.mit.edu/studios/4346864/