- Functions are a way to organize your code and to help with reusing code. Can you think of a real world example where you have a task that you repeat, but things about the task change slightly depending on the inputs? Explain the task, then convert it to psuedocode that includes a function definition that takes inputs, has some conditions or other manipulations of the inputs, and returns and output.
- Additionally, add a comment that explains the difference between printing and returning the output for a function. This is a common source of confusion that we should discuss. It is important for everyone to understand how functions pass data in and out, the scope of variables, and the flow of code execution.