Gallery
Solution Debug 7.2. Easy 123
Share
Explore
Solution Debug 7.2. Easy 123

icon picker
Solution

Solution

solution
# print a heading
print('\n\nCartoon Favourites\n\n')

# sets up array of strings
toons = ['Baymax', 'Buzz', 'Lightning McQueen', 'Sulley', 'Nemo', 'Crush', 'Forky', 'Bo-Peep', 'Rex', 'Boo']

# repeats for the size of the array and prints each out element
for i in range(0, len(toons), 1) :
print(str(i + 1) + ' : ' + toons[i])

print('\n\n') # display blank line (2)
original
# print a heading
print('\n\nCartoon Favourites\n\n')

# sets up array of strings
toons = ['Baymax', 'Buzz', 'Lightning McQueen', 'Sulley', 'Nemo', 'Crush', 'Forky', 'Bo-Peep', 'Rex', 'Boo']

# repeats for the size of the array and prints each out element
for i in range(1, len(toons), 1) :
print(str(i + 1) + ' : ' + toons[1])

print('\n\n') # display blank line (2)

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.