Daily Python Projects
Python Code Dictations
Expanding List of Colors - Python Code Dictation
1×
0:00
Current time: 0:00 / Total time: -2:06
-2:06

Expanding List of Colors - Python Code Dictation

Level: Easy 🟡

What is this post about?

This is an audio code dictation to help learners memorize Python syntax. Follow these steps to complete a dictation:

  1. Open a code editor on your computer.

  2. Play the audio and type the narrated code while listening.

  3. Compare your code with the correct code below.

Correct Code

colors = ["red", "blue"]
colors.append("green")
colors.append("yellow")

# Show the updated list
print("Initial colors:", ["red", "blue"])
print("Updated colors:", colors)

# Show the number of colors
color_count = len(colors)
print("Total number of colors:", color_count)

Explore More Dictations

Discussion about this episode