Daily Python Projects
Python Code Dictations
Doubling Numbers in a List - Python Code Dictation
1×
0:00
Current time: 0:00 / Total time: -2:14
-2:14

Doubling Numbers in a List - 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

numbers = [1, 2, 3, 4]
doubled_numbers = []

doubled_numbers.append(numbers[0] * 2)
doubled_numbers.append(numbers[1] * 2)
doubled_numbers.append(numbers[2] * 2)
doubled_numbers.append(numbers[3] * 2)

print("Original numbers", numbers)
print("Doubled numbers", doubled_numbers)

Explore More Dictations

Discussion about this episode