Lecture 06 Overview
https://grinch.caltech.edu/diagnostic/cs1/24fa/7a)
"Feedback-nostic" (- As announced on Canvas, today's diagnostic is all about feedback!
- We've already gotten some feedback that I want to address:
- There's a lot of responses that take on two forms:
- "Lecture is too fast and doesn't cover syntax"
- "Lecture is too slow and doesn't cover interesting algorithms"
- This is actually completely expected for a first programming course!!! Experience is very varied and we're doing our best to make sure everyone is covered and has a good time.
- Regardless, we're going to try some things to help everyone:
- We have readings! These have always been there (thanks Mike!), but a lot of people didn't know about them. We will now designate "pre-lecture" readings for each lecture which you can, but do not have to, read to make sure you have the foundational syntax in place before lecture!
- Starting with project03, all projects will have "honor roll" problems which are not worth credit but are worth brownie points.
- Please go to recitation if you need more help! The TAs are happy to answer any sorts of syntax questions or things you didn't completely get in lecture there!
- More clearly articulated goals for lecture. (That's what this document is.)
- There's a lot of responses that take on two forms:
Case Study: Wordle
-
Introduction to File I/O (Making a list of words from a file) (https://gitlab.caltech.edu/cs1-24fa/lecture-code/-/blob/master/06/words.py)
- What is a file?
- How do we read files?
get_words() -> list[str]
-
Introduction to dictionaries
- What is a dictionary (or map)?
- Why are they useful?
- How do we initialize dictionaries in code?
- What are some useful syntax for dictionaries?
-
The "wordle" game (https://gitlab.caltech.edu/cs1-24fa/lecture-code/-/blob/master/06/wordle1.py)
get_wordle_words() -> list[str]
how_many_exact_matches(word1: str, word2: str) -> int
get_counts_of_letters(word: str) -> dict[str, int]
how_many_overall_matches(guess: str, answer: str) -> int