Instructor Notes

General Notes


It’s all right not to get through the whole lesson.
This lesson is designed for people who have never programmed before, but any given class may include people with a wide range of prior experience. We have therefore included enough material to fill a full day if need be, but expect that many offerings will only get as far as the introduction to Pandas.
Don’t tell people to Google things.
One of the goals of this lesson is to help novices build a workable mental model of how programming works. Until they have that model, they will not know what to search for or how to recognize a helpful answer. Telling them to Google can also give the impression that we think their problem is trivial. (That said, if learners have done enough programming before to be past these issues, having them search for solutions online can help them solidify their understanding.) It’s also worth quoting Trevor King’s comment about online search: “If you find anything, other folks were confused enough to bother with a blog or Stack Overflow post, so it’s probably not trivial.”

Running and Quitting


Instructor Note

Estimated: 9:30 - 10:00



Variables and Assignment


Instructor Note

Note that: There are different standards/conventions for variable naming. Jonathan will talk more about that later in the workshop. You can choose which naming convention you prefer but the important part is to be consistent through out your code.

Estimated: 10:00 - 10:30



(Talk) The Zen of Python


Instructor Note

If you’re not familiar with Python, don’t be alarmed if this looks confusing. By the end of the workshop this will all make sense. And you can always refer back to the Zen of Python by using “import this”.

Name spacing is not a beginner concept so we won’t talk about it in this workshop but feel free to find us in the break or email any questions to us.

Estimated: 10:30 - 10:50

Source: https://fdmrwth.pages.rwth-aachen.de/rdm-overview/modules/coding/zen_of_python.md



Morning Coffee


Instructor Note

Estimated: 10:50 - 11:00



Data Types and Type Conversion


Instructor Note

Estimated: 11:00 - 11:30



Instructor Note

Pause here and ask the learners to try to come up with two ways of arriving at the value 352 using the + operator.

Possible solutions include:

PYTHON

print(300 + 50 + 2)
print("3" + "5" + "2")
print("3" + str(50 + 2))


Built-in Functions and Help


Instructor Note

A function in Python is a reusable block of code that performs a specific task and can be called with arguments to operate on data. It is defined using the def keyword and can return a value using return. We will first discuss Built in functions but later on Jonathan will talk about how to write your own functions.

Estimated: 11:30 - 12:00



Instructor Note

Regarding use of min() and max() to compare values: ASCII (American Standard Code for Information Interchange) and Unicode define a numerical representation for characters, determining their order in comparisons like min() and max() in Python.

Each character has a unique integer value, with common characters ordered as follows: - Digits (0–9) → 0-9 (ASCII 48–57) - Uppercase letters (A–Z) → A-Z (ASCII 65–90) - Lowercase letters (a–z) → a-z (ASCII 97–122)

Unicode Order (Beyond ASCII) Unicode extends ASCII, covering symbols, emojis, and characters from various languages. The ordering logic is similar—characters are compared based on their Unicode code points.

You can check a character’s ASCII/Unicode value in Python using:

print(ord('A'))  # 65
print(ord('a'))  # 97
print(ord('0'))  # 48


Lunch Break


Instructor Note

Estimated: 12:00 - 13:00



Libraries


Instructor Note

Estimated: 13:00 - 13:30



(Talk) Third Party Libraries


Instructor Note

Estimated: 13:30-13:50

Source: https://fdmrwth.pages.rwth-aachen.de/rdm-overview/modules/coding/third_party_libraries.md



Afternoon Break


Instructor Note

Estimated: 13:50 - 14:00



Reading Tabular Data into DataFrames


Instructor Note

Estimated: 14:00 - 14:30



Instructor Note

Before we break, point out that we can chain things together. For example, earlier we used data_oceania_country.T to transpose the data, then we used data_oceania_country.describe() to get summary statistics. We could have done this in a single line of code by ‘chaining’ the commands:

PYTHON

data_oceania_country.T.describe()


Pandas DataFrames


Instructor Note

Estimated: 14:30 - 15:00



Instructor Note

Learners often struggle here, many may not work with financial data and concepts so they find the example concepts difficult to get their head around. The biggest problem though is the line generating the wealth_score, this step needs to be talked through throughly: * It uses implicit conversion between boolean and float values which has not been covered in the course so far. * The axis=1 argument needs to be explained clearly.



Plotting


Instructor Note

Estimated: 15:00 - 15:30



Instructor Note

There are a number of plot styles available in matplotlib.

https://matplotlib.org/stable/gallery/style_sheets/style_sheets_reference.html



(Talk) Git Control System


Instructor Note

Estimated: 15:30 - 16:00

Source: https://fdmrwth.pages.rwth-aachen.de/rdm-overview/modules/coding/git.md



Day 1 Recap


Instructor Note

Estimated: 09:00 - 09:15



Lists


Instructor Note

Estimated: 09:15 - 10:00



Dictionaries


Instructor Note

Estimated: 10:00 - 10:45



Instructor Note

While a value can be anything, keys in a dictionary must be “hashable”. We aren’t going into hashable vs non-hashable types in this workshop, but generally, strings, integers and floats are hashable, whereas other dicts and lists are not.

There is a special kind of list called a “tuple” that is hashable, defined by () rather than [].



Morning Coffee


Instructor Note

Estimated: 10:45 - 11:00



For Loops


Instructor Note

Estimated: 11:00 - 12:00

Coming on the heels of lists and dicts, we don’t want to overload learners. We’ll take our time on this section.



Lunch Break


Conditionals


Instructor Note

Estimated: 13:00 - 13:45



(Talk) Clean Code


Instructor Note

Estimated: 13:45 - 14:00

Source: https://fdmrwth.pages.rwth-aachen.de/rdm-overview/modules/coding/clean_code.md



Afternoon Break


Instructor Note

Estimated: 14:00 - 14:10



Looping Over Data Sets


Instructor Note

Estimated: 14:10 - 14:30



Writing Functions


Instructor Note

Estimated: 14:30 - 15:30



Variable Scope


Instructor Note

Estimated: 15:30 - 15:45



Programming Style


Instructor Note

Estimated: 15:45 - 16:15



(Talk) Libraries with Compiled Code


Instructor Note

Estimated: 16:15 - 16:45

Source: https://fdmrwth.pages.rwth-aachen.de/rdm-overview/modules/coding/compiled_code.md



Feedback


Wrap-Up