From 364197df68c46a89716a2d5a1e24aca70fd7a544 Mon Sep 17 00:00:00 2001 From: Adam Blank <blank@caltech.edu> Date: Fri, 18 Oct 2024 17:55:42 +0000 Subject: [PATCH] autocommit --- 08/overview.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 08/overview.md diff --git a/08/overview.md b/08/overview.md new file mode 100644 index 0000000..7fe5ec1 --- /dev/null +++ b/08/overview.md @@ -0,0 +1,20 @@ +# Lecture 08 Overview + +# Keyword Arguments +- You can provide "optional" arguments in `python` + +# New List Functionality +- `lst[-1]` +- `list.pop()` +- `list.pop(0)` + +# More Dictionaries +- `d.keys()` +- `d.values()` +- Cumulative Algorithm Patttern for dictionaries + +# Case Study: A Joke Teller! +- `get_n_jokes(n: int, type: JokeType = "any") -> list[Joke]` +- `get_average_joke_rating(ratings: dict[int, int])` +- `find_best_joke(jokes: dict[int, Joke], joke_ratings: dict[int, int])` +- `tell_jokes(n: int = 3)` -- GitLab