Prompt: 1. Develop a rule for deciding when to create a function with a parameter rather than a normal function. Below your rule write a couple sentences justifying your rule.
Whenever you have a function that needs an input, use parameters. For example, if you had a function that took 2 numbers and added them, then multiplied them together, you would want a parameter for the input.
Prompt 2. When do you need a function with a parameter?
Whenever you need a outside input to the function.
No comments:
Post a Comment