What processes and tasks, from real life, can fit into the various ways you can define a function?
You can make functions for any process or task in real life, you just need to know the different ways to define a function and how to apply that to the task. An example can be cleaning a house. You can break up all the different parts of cleaning the house into different functions. Some tasks can be done at any time or in any order, like putting things where they go, or dusting the furniture. Some tasks cannot be done until other tasks have been done, such as mopping the floor after you sweep and not before. You also have tasks that need be done only when it happens, such as unclogging a toilet. You can make a function for unclogging the toilet. In a normal house cleaning you wouldn’t need to unclog the toilet all the time. Why would you perform the task of unclogging a toilet if the toilet is not clogged, that makes no sense. You would only perform the task (call the function) if the toilet was clogged and therefore needs unclogging. Other tasks can only be done as a result of another task such as using a dish washer. To use a dish washer, you first need to load it, then run it, and as a result you put away clean dishes. You wouldn’t perform the task of putting away clean dishes if they have not been first loaded into the dishwasher and then washed. You cannot run the dish washer unless its first loaded, and you cannot load it unless you have emptied it first. All these are different ways to define a function.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)