Chapter 7. What's in Your Backpack?

In Chapter 6, Working with Data – Lists and Dictionaries, we explored how to store, retrieve, and change data using lists and dictionaries in Python. In this chapter, we will build a two player game called What's in Your Backpack? This game will require us to review all of the skills we have learned since the beginning of this book. We use our skills to make loops, ask for information from the user with the raw_input() function, and then store this information in lists or dictionaries.

Be prepared to also learn some new skills that might seem complicated. We will try something called nesting or putting one thing inside another. With nesting lists and dictionaries, we have more flexible data storage. Using this ...

Get Python Projects for Kids now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.