Suggestion for lesson 8: Add example of a case where duplication is avoided using functions
The lesson starts with an "abstract" discussion on why one might want to define own functions.
Maybe it would be good to actually demonstrate these problems? I'm just not sure what would be not too artificial and not too complicated, and take not too much time of the lesson just for illustrating the motivation for using functions.
Maybe something like: have the fahrenheit-to-celsius formula used twice, using copy-pasing, and with a little mistake. Then it is immediately clear how it would be nice to change the formula only in one place instead of looking for all wrong copies and fixing them.
Hi @apirogov , Thank you for taking the time to submit feedback about the lesson. Regarding the "abstract" discussion on why we might define our own functions, do you think the reasoning currently given is unclear? I agree that if a demonstration of a problem is added, it should be not too artificial, complicated, or long. However, if it is needed to make the need for defining functions more clear, pull requests suggesting changes are welcome.