New Activity
Play Matching Pairs

When breaking a problem down, you often encounter elements that you want to use repeatedly in your code. Sometimes it's appropriate to write a new function; at other times it's appropriate to write a loop. There is no hard-and-fast rule as to which is better, but what do you think? What kinds of circumstances would lead you to writing a function versus using a loop?

Free Response: It is said that functions with parameters generalize the behavior of a more specific command. Explain what this sentence means to you using the difference between turnLeft() and turnLeft(angle).

Today we solved a series of problems with a limited set of commands (only 4). Give at least one reason why it's useful to learn how to solve, and program solutions to problems with a limited set of commands.

In the Create Performance Task you will be asked to identify an abstraction in your program and explain how it helps manage the complexity of the program. Functions are a form of abstraction. Pick a function you wrote in your solution to the 3x3 square problem and explain how it helps manage the complexity of your program.

Free Response: “Abstraction” is often used to indicate cases where we focus on a general case and ignore a specific instance of a problem. Given this meaning of the word, how are functions with parameters an example of abstraction?

In your own words explain at least one reason why programming languages have functions.

So when you do get more commands you still know how to simplify it instead of making something more complicated than it needs to be.

move3 helped becasue there was a lot of moving forward three times in a row and the move3 function helped do that many times

So when a task is repeated often it is easily done with one block instead of a lot.

Parameters make a function so they can be change easily so you can make variations withing your drawing while still not have to much code to focus on the big picture

turnLeft() is always the same degrees that you can't change (90). But when you use turnLeft(angle(45)) you can set your own degrees. For the example I used 45 degrees which will be a different value that you can change to make the function more precise to your needs.

A new function would need to be made if the object you are change it's form or how it looks and a loop would be if you are just changing the number of times you make the object.