IT 116: Introduction to Scripting
Class 23 Ungraded Quiz

  1. Write a Python expression that creates a slice containing the second through the fourth elements of the list l1.


  2. Write a Python expression that evaluates to True if the list l1 contains the value 4.


  3. Write a Python statement to add 6 to the list l1.


  4. Write a Python expression that concatenates the lists l1 and l2.
    l1 + l2
  5. Write a Python statement that prints the LAST element in the list l1.
    print(l1[-1])
  6. Write a Python statement that removes the first element in the list l1.


  7. Write a Python statement that sorts the list l1.


  8. Write a Python statement that sorts the list l1 in reverse order.


  9. Write a Python expression that gives the largest value in the list l1.


  10. Write a Python expression that gives the smallest value in the list l1.