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

  1. Can a list be an element of a list?
    yes
  2. What do you call a list each of whose elements is a list?
    a two-dimensional list
  3. What is a tuple?
    a sequence that cannot be changed
  4. Write a Python statement that creates a tuple assigned to the variable numbers containing the integers 1 through 5.
    numbers = (1, 2, 3, 4, 5)
  5. Write a Python statement that creates an empty tuple assigned to the variable empty.
    empty = ()
  6. Write a Python statement creates a tuple containing only the integer 1 and assigns it to the variable t_1.
    t_1 = (1,)
  7. Does does a tuple have an append method?
    no
  8. Can you concatenate two tuples?
    yes
  9. Does a tuple have a sort method?
    no
  10. What is the name of the tuple conversion function?
    tuple