Getting and storing player information

Our first task is to figure out how we are going to get and store information from those who play our game. There are a few steps we need to take, including asking the player for their name, and then storing the player's name. We will also perform some code in the background to store information about the player that we have not yet asked for. This is a sneaky bit of coding that is quite fun and will let you expand your game if you want to. Let's walk through each step.

Making a players list

The first thing that we will do is make an empty list to store information about each player. We are going to name the list players, but we are not going to put anything in our list yet. Why not? Well, our players might ...

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.