Lesson 3.12 & 3.13 Notes
3.12 Notes
- A procedure is a named set of instructions that can take in parameters and after the code is run, return values.
- Parameters are used inside of procedures as independent variables.
Parameters can be used in 3 ways, those being sequences, selections, and iterations.
- You can call a procedure by writing the name of a procedure and adding the parameters in parentheses.
- To return values you must write return followed by the expression.
- Arguments are what is printed
- Return is necessary for functions to work.
3.13 Notes