TECHNOLOGEPH

A Computer Science Curriculum for Kids




Lesson 3: Lists




  1. Have a group of students stand in a line, representing a list. Have other students take turns writing out list operations on the board, using students' names as items in the list. The students should then act out the list operations.

Plugged Activites


  1. Write a function countItem, without using the .count() method, that takes as input a list, and an element el and returns the number of times el appears in the list.

  2. Write a function that iterates over a given list of strings, returns a (new) list containing all the strings that are palindromes (read the same backward and forward).

  3. Create a function that takes a list of numbers and sorts it in ascending order.


    Bonus: Create a function that sorts in descending order