Search
Contents
12.
Python Dictionaries
12.
Python Dictionaries
ΒΆ
12.1. Dictionary Basics
12.1.1. Why Use Keys?
12.1.2. Create a New Dictionary
12.1.3. Accessing Values
12.1.4. Key Data Types
12.1.5. Check Your Understanding
12.2. Working with Dictionaries
12.2.1. Change One Value
12.2.2. Add a New Key/Value Pair
12.2.3. Remove a Key/Value Pair
12.2.4. Try It!
12.2.5. Check Your Understanding
12.3. Dictionary Methods
12.3.1. Common Dictionary Methods
12.3.2.
max
,
min
, and
len
12.3.3. Check Your Understanding
12.4. Iterating Through Dictionaries
12.4.1. Loop by Keys or Values
12.4.1.1. Loop by Key/Value Pairs
12.4.2. Sorting by Keys
12.4.3. Check Your Understanding
12.5. Accumulator Pattern with Dictionaries
12.5.1. Adding to an Empty Dictionary
12.5.2. Accumulate with an Exiting Dictionary
12.5.3. Check Your Understanding
12.6. Search a Dictionary
12.6.1. Default Search Method
12.6.2. Try It!
12.6.2.1. Sample Output
12.6.2.2. Bonus!
12.7. Code Like a Pirate!
12.7.1. Lists vs. Dictionaries
12.7.2. Translation App
12.7.3. Talk Like A Pirate
12.7.3.1. Consider Case
12.7.3.2. Final Touch
12.8. Exercises: Dictionaries
12.8.1. Part A: Search a Dictionary
12.8.2. Part B: Keys from a Collection
12.8.3. Part C: Modify Values
12.8.4. Part D: Counting Characters
12.8.5. Part E: Use a List to Sort Key/Value Output
12.9. Project: Mad Dictionaries
12.9.1. Part 1: Mad-Lib Text
12.9.2. Part 2: Build a Dictionary
12.9.3. Part 3: Query the User
12.9.4. Part 4: Print the Result
12.9.5. Part 5: Try Bigger Mad-Libs
12.9.6. Part 6: Bonus Mission
←
11.9.
Project: Collaborative Turtles Activity
12.1.
Dictionary Basics
→