Suggestion: introduce getcwd and listdir, and remove lesson content about Markdown #554
Labels
good first issue
Good issue for first-time contributors
help wanted
Looking for Contributors
type:enhancement
Propose enhancement to the lesson
I have helped in a few courses run based on the Gapminder material, and in common with Issue #528, getting to the correct directory and accessing the files is a common source of grief. My suggestion would be:
The high-level argument for (2) is that Markdown is not mentioned throughout the rest of the course material -- furthermore, it is more a feature of Jupyter and other notebook IDEs rather than Python itself. A Python learner will often be stumped by "File not found"-type errors from not knowing how to navigate directory structures in-script (including in the course itself!), far more than wanting to put a notebook cell into Markdown and not knowing how to.
This would entail the following changes:
Objectives
Create Markdown cells in a notebook.Key Points
The Notebook will turn Markdown into pretty-printed documentation.Markdown does most of what HTML does.and replacing the Markdown content with some exposition around an exercise to open a new Python cell, run the following commands, and describe the results:
from os import getcwd, listdir
print(getcwd())
print(getcwd()+'/data')
print(listdir('data'))
print(listdir(getcwd() + '/data'))
Learners can be reassured that they will understand the syntax a lot more later on in the course, but for now, they are just learning how to check their working directory and make sure they have their Gapminder data files. Any errors can be handled by instructors and helpers on the spot, making it much more likely that learners will have their scripts / notebooks open in the correct directories and that their data files are already accessible for future use. By moving out the Markdown material, this change will not lengthen the course (and indeed might shorten it by frontloading all the environment setup).
The text was updated successfully, but these errors were encountered: