Chapters
Python114 chapters

Exercises

Lists

3 tasks. Write the code, press Check, and the page runs it against a real Python interpreter.

Exercise 1

Make a list of the three names Ada, Grace and Katherine, then print how many there are.

Python
# build the list and print its length
Exercise 2

Turn the string abc into a list of its characters and print it.

Python
# print ['a', 'b', 'c']
Exercise 3

Print how many times 10 appears in the list.

Python
scores = [10, 20, 10, 30, 10]
# print the count of 10