IT 116: Introduction to Scripting
Class 23 Ungraded Quiz
-
Write a Python expression that creates a slice containing the second through the fourth elements
of the list l1.
-
Write a Python expression that evaluates to True if the list l1
contains the value 4.
-
Write a Python statement to add 6 to the list l1.
-
Write a Python expression that concatenates the lists l1
and l2.
l1 + l2
-
Write a Python statement that prints the LAST element in the list l1.
print(l1[-1])
-
Write a Python statement that removes the first element in the list l1.
-
Write a Python statement that sorts the list l1.
-
Write a Python statement that sorts the list l1 in reverse order.
-
Write a Python expression that gives the largest value in the list l1.
-
Write a Python expression that gives the smallest value in the list l1.