Practice and reinforce the concepts from Lesson 5
Time needed: 45-60 minutes
What you'll create: 4 exciting list programs that store and organize data!
Ready to become a list master? :dart: In this activity, you'll complete 4 fun challenges that will help you practice working with Python lists. Remember - making mistakes is how we learn! Every programmer started exactly where you are now.
Check these off as you go:
Exercise Lists 1
:bulb: Save Often!
Set a timer for every 5 minutes to remind yourself to save. Lost work is no fun! :emoji:
Time: 10-15 minutes
Look at the challenge below and follow these steps:
Your output should look like this:
:bulb: What's Happening?
This exercise teaches you how to create a list and display it. In real Python, it would look like:
my_list = ["item1", "item2", "item3"]
Time: 10-15 minutes
For this challenge:
Your output should look like this:
:bulb: Common Mistake!
If you get an error, check your list positions. Remember: First item = position 0, Second item = position 1, and so on!
Time: 10-15 minutes
This one's exciting! You'll learn to:
Your output should look like this:
:bulb: Troubleshooting
- If items aren't adding: Check that you're using the append block correctly
- If removal fails: Make sure the item exists in your list first!
Time: 10-15 minutes
The final challenge! Here you'll:
Your output should look like this:
:bulb: Pro Tip!
Take your time with this one. If it doesn't work the first time, trace through each step slowly. You've got this! :muscle:
Before submitting, check that you have:
Finished early? Try these extra challenges:
:bulb: Real-World Connection
Lists are everywhere in programming! Games use lists to store inventory items, apps use lists for user data, and websites use lists for search results. You're learning a superpower! :emoji::emoji:️:emoji::emoji:️
When you have completed your "Python Lists Exercises" activity:
Important: You need to submit 4 project links for this activity - one for each exercise. Label them clearly (Exercise 1, Exercise 2, etc.)
:bulb: Submission Checklist
- Exercise 1 link copied and ready
- Exercise 2 link copied and ready
- Exercise 3 link copied and ready
- Exercise 4 link copied and ready
- All outputs match the expected results
Great job completing the Lists activity! You're becoming a real programmer! :tada: