← Back to the Introduction to Computer Science outline The Course Maker
← Introduction to Computer Science outline
Week 10 · Readings & resources

Week 10 — Readings & Resources

Introduction to Computer Science Free sample edition

Your primary reading is Chapter 10 (in this module). Everything below is the optional, go-deeper layer — pick what helps, skip the rest.

How to use this page

This page has 11 items (5 readings and 6 videos). Allow 82–98 minutes for everything. Each group points back to the matching chapter section and class-session segment, so use the full menu when you want more, or take the quick path below.

Every video here has captions: turn them on with the CC button in the player. The chapter covers the same ideas in text.

Pick-one quick path (20–22 min total)

① Fixed records: tuples and the one-line swap

Chapter 10, Section “Keep a fixed record together: the tuple” · Session 1, Segment 2, “Tuples and the swap” · Remember: a tuple is read like a list but never changed, and the comma, not the parentheses, makes it.

  • Understanding Tuples in Python 3 — DigitalOcean — a careful written tutorial; read the introduction, Indexing Tuples, and How Tuples Differ from Lists, where a program that assigns into a tuple fails with TypeError, and skip the parts on concatenating and on built-in functions. This builds on Week 9's work with lists, since a tuple is read with the same square brackets. (reading, 8–12 min)
  • Python tuples — Bro Code — a three-minute demo of making a tuple and reading its items; before each print, say whether the line reads the tuple or tries to change it. (video, 3 min) (captions: creator)
  • Tuple Assignment in Python, How to Swap Two Variables — Coding with Estefania — a diagram-based walk through assigning several names in one line and swapping two values without a spare name; pause at each swap and predict both values first. Use it while working through the Week-10 module overview. (video, 8 min) (captions: automatic)

② Looking things up by name, and the missing key

Chapter 10, Section “Look things up by name: the dictionary” · Session 1, Segment 4, “Dictionaries and KeyError” · Remember: square brackets demand the key, while get hands back a default when the key is missing.

  • Python Dict and File — Google's Python Class — a compact lesson; read the Dict Hash Table section on lookup, the KeyError, in, get, and looping over keys and items. One code comment says the keys come out in a random order; run its example and you will see the order the keys went in. Stop at Dict Formatting; the sections on del and on files belong to later weeks. (reading, 8–12 min)
  • Access Dictionary Items — W3Schools — a one-screen reference with try-it boxes; read Accessing Items, Get Keys, Get Values, Get Items, and Check if Key Exists, and predict each try-it output before you run it. (reading, 4–6 min)
  • Python Tutorial for Beginners 5, Dictionaries, Working with Key-Value Pairs — Corey Schafer — a ten-minute screencast that builds a dictionary, reads values by key and with get, adds and updates pairs, and loops through the key-value pairs; skip the part that removes keys, which comes later. (video, 10 min) (captions: automatic)
  • Python Dictionaries, Visually Explained — Visually Explained — an animated tour of creating a dictionary, reading values, dictionaries versus lists, and the rules for keys; the key-rules chapter shows that keys must be unique and can be numbers as well as strings, but it never says why a list cannot be a key, so take that rule from Chapter 10. (video, 10 min) (captions: automatic)

③ One of each, and choosing the container

Chapter 10, Section “Keep one of each: the set” · Session 2, Segment 6, “Sets and choosing a container” · Remember: a set keeps one copy of each value and promises no order, so you predict its length and its in tests.

  • Python Sets — Programiz — a short explainer with runnable examples; read Create a Set in Python, Create an Empty Set in Python, Duplicate Items in a Set, and Find Number of Set Elements, and skip the set operations, which come later. (reading, 6–10 min)
  • Python lists, sets, and tuples explained — Bro Code — a fifteen-minute side-by-side of the three containers; skim the list part you met in Week 9 and watch the set and tuple parts. When it calls a set immutable, it means a set's items cannot be changed in place; the set itself still gains and loses items with add and remove. Its advice that tuples are faster is the presenter's claim, not something this course tests, and remember that empty curly braces make a dictionary, not a set. (video, 15 min) (captions: automatic)
  • Python Lists vs Tuples vs Sets, Visually Explained — Visually Explained — a six-minute animated comparison of syntax, duplicates, order, and changeability; at the summary, name the job each container fits before the video does. (video, 6 min) (captions: automatic)

Optional one-stop reference (free online reference)

  • Dictionaries, The Python Tutorial section 5.5 — Python Software Foundation — the official tutorial's section on dictionaries, the course's free reference for every language fact; read how keys must be immutable, how list(d) gives the keys in insertion order, and how in checks a key, and stop at section 5.6, which covers looping techniques beyond this week. (reading, 4–6 min)

Heads-up (links rot): these point to outside sites that occasionally move or rename pages. If a link ever fails, tell your instructor and use the reference above in the meantime.

Provenance: Built with The Course Maker · samples.thecoursemaker.com