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

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


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


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


  4. Write a Python expression that gives the value of the index, in the list list_1, of the element whose value is 3.


  5. Write a Python statement that adds the value 0 to the list list_1 at the first position in the list.


  6. Write a Python statement that removes the first element in the list list_1.


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


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


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


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