Tag Archives: functions

What’s the point of Functions in #programming? (for primary/middle schoolers)

My common day-to-day use is “something that is used to generate individual parts of something, and that I might write alternative versions of in future”. Here the use of a function lets you replace a generator with a different generator. Such examples occur frequently in OOP, but are only truly dependent upon functions. For instance:

“draw Forest”: Example #python lesson/code for why functions/procedures are useful

Again, I was looking for something to include in my lesson that would show the value of procedures [1] in a way that the students would care about. I wrote this, and set it up as a demo at start of lesson as they came in. PS: note the faked perspective effect. If you have

Read More