Module 5 Unit 4 - Putting it all Together#
Unit Learning Objectives#
By the end of this unit, you will be able to
Demonstrate how both Markdown and Python can be used together in a notebook
Literate Programming in Action#
Please note watching this video is important for understanding the next sections in this unit.
Referring back to Module 3, the driving concept behind the Jupyter notebook is the idea of literate programming, where you can have plain text formatting and executable programming code adjacent to each other and interspersed in a single document. The idea is to have a word processor, spreadsheet and executable coding platform all in one document to help enable cohesive report generation, and to be better able to explain how the process of computational thinking is executed through code.
As we also discussed in Module 3, the Markdown language is itself a lightweight markup language that helps enable the literate programming paradigm. In addition, for Math and Science teachers, the LaTeX language is a document preparation system that enables you to do high-quality typesetting, especially with respect to mathematical and scientific notation, in a Jupyter notebook. Overall, Jupyter Notebooks provide a powerful platform for Markdown and Python languages (and sometimes LaTeX) which can be combined in powerful ways to demonstrate the power of literate programming when applied to the subject of computational thinking.
External Activity#
Think about a real classroom example where you could build a Jupyter notebook that uses both code and markdown cells.
Here is an example of a simple Jupyter Notebook used to calculate the area of a circle.
It incorporates the following techniques that were addressed in Modules 3 and 5.
Markdown Cells
2 levels of headings
Regular Text
Images
LaTeX
Displayed math
Inline math
Code Cells
Comments
Variables
Input
Output
Math Operations using the variables
You may try downloading or opening this notebook, or making one of your own.
Activity#
Can you list all possible options for crossing that get all 4 people across? How many are there?
Of these listings, which one takes the least time?
Is there one that takes a maximum amount of time?
It would be great to have a tool that lets you and your students explore these computational ideas. This is the motivation behind the Callysto project – to get those tools in your hands. In the next module, you will learn about Jupyter notebooks. These are online documents that let you combine your lecture notes with pictures, graphics, and computer code, so your students can learn how to connect ideas to code. It is a powerful way to learn computational thinking.
More examples
You can visit TED-Ed Riddles on YouTube.