You'll frequently need to work with more complex data than strings and Boolean values. This module provides you with tools for doing so. Let's frame the subject by considering a scenario.
Scenario: analyzing a solar system
Suppose you're creating a program to analyze the number of moons on different planets in the solar system. You want to display information to the user and be able to calculate different values, like the total number of moons in the solar system. It would be tedious to do this calculation with variables, which can only store a string, or a number.
In this module, you'll build a program that can perform these types of operations. You'll use Python dictionaries to model the data. By the end of the module, you'll be able to use Python dictionaries to store complex data.
What will I learn?
In this module, you'll be able to:
- Identify when to use a dictionary.
- Create and modify data inside a dictionary.
- Use dictionary methods to access dictionary data.
What is the main objective?
Use a dictionary structure within your app to store data in a format that makes it easy to look up values.