Procedures and Functions

Procedures

Procedures and functions are often used interchangeably in CS vocabulary and tools, but there is a difference. A procedure is a section of code that performs a specific task. One way to decide if you should incorporate a procedure is to look for patterns that repeat. Several coding platforms and puzzles include the concept of procedures.

CS unplugged activities are a great way to introduce a concept by helping students either get hands-on with it or see it from a different perspective. Try out this unplugged activity before diving into a coding activity

This Code.org activity is great for looking for patterns and using repeats with grades 2-4.

LightBot is a great app for exploring procedures with 2-4. There is a free version for Hour of Code.

Kodable is another great app for exploring procedures (they call functions) for K-2, but it does have a subscription fee.

Functions

A function is like a procedure, but it returns a value at the end.

CS Integration Projects

One of the most exciting things about learning a CS concepts like procedures and functions is the possibility for students to use their newfound skill to share their learning in another subject. The possibilities are endless, but here are a few CS integration projects your students will be ready to do after this lesson: