IT 116: Introduction to Scripting
Answers to Class 22 Ungraded Quiz

  1. What do you all a collection of things stored one right after another?
    a sequence
  2. What is a list?
    a sequence object that can be changed
  3. What is a tuple?
    a sequence object that cannot be changed
  4. What do you call the individual values in a list?
    elements
  5. Do the values in a list all have to be of the same type?
    no
  6. What is an empty list?
    a list with no elements
  7. Write an assignment statement that creates empty list list and assigns it to the variable list_1.
    list_1 = []
  8. Write an assignment statement that creates a list of the first 5 integers and assigns it to the variable list_1.
    list_1 = [1, 2, 3, 4, 5]
  9. What do you call the integer that is used to specify an individual value in a list?
    an index
  10. Write an assignment statement that assigns the value of the third element of the list pointed to by the variable list_1 to the variable result.
    result = list_1[2]