Adding items to the virtual backpack

Now that we have added the player's name, we want to add four items to the player's virtual backpack. The virtual backpack is really a list inside the dictionary. We will store the list of each player's items in their virtual backpack, which is inside each player's profile. Asking a player to answer the same question multiple times presents a new programming challenge. How will we limit our program to ask for only four items? How will we add each item to the backpack of the correct player?

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.