Open Colab
New Notebook
Sign Up

Teaching with Colab (Part 2 of 2)

In Part 1, I explained why Colab is great for teaching Python programming. In this article we’ll get into the details — I’ll show you some specific examples of how Colab can enhance your Python teaching toolkit.

Interactive Lecture Notes

Lots of teachers share their lecture notes as slides or docs, which is fine but those are decidedly read-only artifacts. Wouldn’t it be nice if your lecture notes could be interactive, like this example:

Students can also check their understanding, as in the following example:

Interactive lecture notes offer multiple advantages over their static counterparts:

  • While lecturing, instead of just claiming something is true, you can prove it by running code embedded right in your notes. * After class, students can actively review your notes by running the notebook and seeing how it works for themselves. * Students can experiment, make code changes and see the results. * Students can annotate their notes, all in one digital copy.

With this approach, lecture notes come alive, which leads to active learning — giving students an interactive playground in which they can experiment and learn by doing.

Make sure students start with a clean slate — You’ll want each student to start with their own copy of a given class notebook so they can freely change, annotate, and experiment without affecting your official copy. To encourage this approach, all my notebooks start with the following guidance:

Digital Homework

Interactive notebooks are great for homework assignments, because you can:

  • Lay out the assignment goal and instructions in markdown cells. * Include any setup steps (e.g. install required packages) in a code cell. * Provide any required helper functions or other utility code. * Include code hints and building blocks.

Here’s an example homework question:

For class work or homework, you can also provide test code cells, which students can use to verify their work. Here’s an example:

This gives students a definitive way of knowing when they’ve solved a challenge correctly. Unit testing cells also give you a natural opportunity to have a discussion about testing and why it’s important.

How do students submit completed homework assignments? Since Colab notebooks offer the same storage and sharing model as Google Docs, you can have students submit their completed homework by simply sharing their notebooks with your teaching staff. You can also assign Colab notebooks via Google Classroom, which avoids the extra manual sharing step for students.

Another helpful option is providing hints or even full solutions via hidden cells, which can be concealed by default, by inserting #@title at the top of a markdown cell, as shown in this example:

Students can expand the hint or solution if they get stuck but, by default, the extra help will be hidden from their view.

You can, of course, have separate notebooks for lecture notes and homework, but I prefer integrating homework into my lecture notes because that keeps everything associated with a given class meeting in one place.

Assessments

In-class or virtual assessments can also be implemented using Colab notebooks. These would look quite similar to the homework challenges described in the previous section, however, these might be time limited and may be pre-shared with the teaching staff, so submission is automatic at the end of the assessment interval.

Conclusion

With the techniques summarized above, students maintain their own interactive digital artifacts, recording instruction, independent work, annotations, experimentation, comprehension checking, hints/prompting, and testing. These notebooks become a living, individualized, learning artifact managed, maintained by and for your students.

Are you using notebooks to enhance teaching or learning? Share a comment below telling us what you’re up to. And follow this publication to see more content about getting the most out of Colab.