Book Image

Python Projects for Kids

By : Jessica Ingrassellino
Book Image

Python Projects for Kids

By: Jessica Ingrassellino

Overview of this book

Kids are always the most fast-paced and enthusiastic learners, and are naturally willing to build stuff that looks like magic at the end (when it works!). Programming can be one such magic. Being able to write a program that works helps them feel they've really achieved something. Kids today are very tech-savvy and cannot wait to enter the fast-paced digital world. Because Python is one of the most popular languages and has a syntax that is quite simple to understand, even kids are eager to use it as a stepping stone to learning programming languages. This book will cover projects that are simple and fun, and teach kids how to write Python code that works. The book will teach the basics of Python programming, installation, and so on and then will move on to projects. A total of three projects, with each and every step explained carefully, without any assumption of previous experience.
Table of Contents (18 chapters)
Python Projects for Kids
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

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 new nesting skill with the other skills we have learned, we will create a game that can be played by two users or adjusted to be played by many users.