New Activity
Play Quiz
1. 
A problem that the solution can be used multiple times.
2. 
A piece of code that can be called multiple times.
3. 
A group of commands available for the programer to use.
4. 
It shows you how to use the API or Library.
5. 
A group of commands or functions.
6. 
A value that you can supply to a function.
7. 
A value that you can supply to a function.
8. 
A type of loop.
9. 
repeat.
10. 
Breaking the problem down into smaller parts.
11. 
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.
12. 
In your own words explain at least one reason why programming languages have functions.
13. 
Which of the following statements about writing functions and Top-Down Design is NOT true?
A.
Writing functions helps manage complexity in a program.
B.
Top-Down Design leads to programs which feature multiple layers of abstraction.
C.
Two programmers solving the same problem using Top-Down Design should arrive at identical programs.
D.
Top-Down Design relies upon identifying subproblems of a larger problem.
14. 
What is a function parameter?
A.
“para-meter” -- a measure of the distance between a function’s conception and implementation.
B.
A way to give input to a function that controls how the function runs.
C.
A collection of commands that can be used in a programming language.
D.
A named memory location.
15. 
Which of the following are true?
A.
Functions with parameters can be used to prevent the creation of duplicated code.
B.
Parameters can only be used once within the body of a function.
C.
Parameters generalize the solution of a specific problem.
D.
Parameters need not be provided to a function in any particular order.
16. 
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?