Quiz 7 Review

Quiz 7 will focus on lists and logic.

Make sure you understand the list blocks add items to list, insert list item, replace list item, remove list item, select list item.

Here are some example questions from your worksheet:

Assume a variable named colors as declared above.

Complete the blocks above by describing the blocks you would connect to the “if” to test whether the list is shorter than 3 elements and starts with the element “red”.

Write a different condition to test whether the list is exactly 5 elements long and ends with the element blue. Assume that the text output would be “Five element list ending with blue.”

Write a different condition to test whether the list is larger than 7 elements long or contains the element green. Assume that the text output would be “List is large or green is in the list.”