Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionaries not introduced but used in exercise in "Error and Exceptions" - & suggestiong #783

Open
evezeyl opened this issue Feb 9, 2020 · 1 comment · May be fixed by #809
Open

Dictionaries not introduced but used in exercise in "Error and Exceptions" - & suggestiong #783

evezeyl opened this issue Feb 9, 2020 · 1 comment · May be fixed by #809
Labels
good first issue

Comments

@evezeyl
Copy link

@evezeyl evezeyl commented Feb 9, 2020

NB: Good first issue label (cannot be added because not in contributor list)

Exercise Reading error Messages - Lesson "Error and Exceptions"
(http://swcarpentry.github.io/python-novice-inflammation/09-errors/index.html)

  • As dictionaries are not introduced previously in lesson (maybe a consequence of reducing the lesson) I suggest the following:
  1. Moving this exercise at the end of the first lession section - before syntax errors (will be used to ensure that students have understood the traceback - and it is time for an exercice)
    Then this will also provide a good introduction to syntax errors (as the key error is a syntax error, and will naturly flow with the Caturday joke)
  2. Provide a short introduction to exercise: so that students can read the exercise more easily without focussing on the fact that they have not encountered dictionaries before

This can be introduced (in a minimal way) by the instructor when introducing the exercise and should not take more than 1 min (avoiding extra material load for the course)

In this exercise we introduce a data structure that you did not previously encounter: dictionary.
In a dictionary: keys are associated to values: key-values pairs. Values can be of different types (ie:numbers, lists...) but keys must be unique and immutable (no lists). Dictionaries can be constructed using the following syntax:
a_dictionary = {'key1' : value1, 'key2': value2}

Dictionaries are not ordered, consequently we cannot access values using indexes, but we can acess values using their corresponding key. Ex:
print(a_dictionary['key1'])

All the best
Eve

@maxim-belkin maxim-belkin added the good first issue label Feb 9, 2020
@tobiashuste
Copy link

@tobiashuste tobiashuste commented Mar 2, 2020

This sounds like a very reasonable suggestion to me.

Let me submit a PR for that.

tobiashuste added a commit to tobiashuste/python-novice-inflammation that referenced this issue Mar 2, 2020
The exercise "Reading Error Messages" is moved before the "Syntax
Errors" section, in order to ensure learners understood Tracebacks
before moving onwards.

Related to swcarpentry#783
tobiashuste added a commit to tobiashuste/python-novice-inflammation that referenced this issue Mar 2, 2020
A dictionary is used in the "Reading Error Messages" exercise which has
not been introduced before. The learner should be able to get to know
dictionaries by this very brief explanation.

Closes swcarpentry#783
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue
Projects
None yet
3 participants