Level 3: Lists - IncrediCoders/Python1 GitHub Wiki

GitHubAvatar copy

Annie Conda added this page on March 15, 2025


Here is a bonus article that will tell you more about Lists!

In addition to this bonus article, you can find other bonus articles that teach you the topics I covered in Level 3: File Handling, Arguments, and While Loops.

Learn About Lists

A list is like a container that holds multiple items in one place. Instead of making a different variable for each item, a list keeps them organized together. Kind of like a school backpack holding pencils, books, and snacks. Lists are super helpful when you want to keep track of a bunch of things all at once.

Why Lists Matter

Lists let you store and work with lots of data using just one variable. You can add to a list, take things out, or look at just one item. They make it easier to loop through items or check things one by one.

For example, at IncrediCoders Academy, Paul Python might say: “I packed my lunchbox with a sandwich, an apple, and juice. That’s a list of 3 things.”

Python Example

In Python, a list is made with square brackets []. You can put as many items as you want inside, separated by commas.

Scenario: Paul Python is packing his backpack with his school supplies.

backpack = ["notebook", "pencil", "eraser"]

print("Paul packed:", backpack)

This means that Paul Python has 3 items in his backpack: a notebook, a pencil, and an eraser.

Comparing Programming Languages

All programming languages have lists, sometimes called arrays. But the syntax is different. Some are easier to read than others.

Scenario: We want to store the names of Paul’s 3 friends: Grafika Turtle, Annie Conda, and Bayo Wolf.

Python

friends = ["Grafika Turtle", "Annie Conda", "Bayo Wolf"]

Java

String[] friends = {"Grafika Turtle", "Annie Conda", "Bayo Wolf"};

C#

string[] friends = {"Grafika Turtle", "Annie Conda", "Bayo Wolf"};

What’s the Difference?

  • Python uses simple square brackets [] and does not need to say what type of data is inside.
  • Java and C# use arrays, which are like lists, but you have to say the type of item inside, like String for words.
  • All three languages group multiple values into one tidy container.

No matter the syntax, lists are your way to store and organize many values at once.

Next Steps

Next, you can take on the two extra challenges and a bonus challenge to add to your Classroom Quiz program and learn more! When you're done, you can move on to Level 4, the Space Wars game!

Take the Challenges!

  1. Challenge 1: Add a score to the game, so you can try to get all the questions right. When the game ends, display the score!

  2. Challenge 2: Make the text of the answer choices turn red and green to show which one is the correct answer, as a visual feedback effect.

  3. Bonus Challenge: First, you're going to load in a new quiz with more questions! Then, you're going to add in some of your own quiz questions! Finally, you're going to make your own quiz about whatever you want!

More Level 3 Resources

In addition to this Help page and the instructions for our Level 3 challenges, we also have Online Articles, a Learning Quiz, an Unplugged Activity, and a Rewards article:

  • Level 3: Online Articles - I made you a list of different web pages I found, which will help you learn more about creating a Classroom Quiz.

  • Level 3: Learning Quiz - I wrote some questions in case you want to quiz yourself about what you learned. Or you can teach others and quiz them!

  • Level 3: Unplugged Activity - I wrote this page with more details than what you saw in the book. In this game, you'll have one person act as the developer, and one person act as the variable where the developer chooses a noun for the variable to say in the story that they tell!

  • Level 3: Rewards - If you completed the Class Introductions project that we talked about, then I set up this page to act as a reward. You can see some illustrations of me and learn more about who I am! You'll also find the Apple Award digital download, to show off your accomplishment!

Level 4

After you're completely done with Level 3 (did you do the challenges?), then it's time to move on to Level 4! While you read through Level 4 in your book, you can check out the resources from SideWinder, as she teaches you how to build the Space Wars game:

I hope you had fun learning about Classroom Quiz! This is something that is very important for all of the future levels! Enjoy!

-- Annie

⚠️ **GitHub.com Fallback** ⚠️