Lists
x = [ 1, 2, 3, 4, 5 ]
What does the expression, « x[ 3 : ] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[-2] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ : : ] » evaluate to, if placed at the end of the program above?
1 point
Which is/are correct methods for adding the value 6 at the end of the list?
1 point
What would the expression, « x[2] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ : : 1 ] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ 3 : : -1 ] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ : ] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ 3 : 0 ] » evaluate to, if placed at the end of the program above?
1 point
What does the expression, « x[ 0 : 3 ] » evaluate to, if placed at the end of the program above?
1 point
Which is/are correct methods for removing the value '3' from the list?
1 point
What does the expression, « x[ -5 : -2 ] » evaluate to, if placed at the end of the program above?
1 point
Which statement would result in the variable 'x' referring to the same list values as hard-coded in the program above?
1 point
What does the expression, « x[ : : -1 ] » evaluate to, if placed at the end of the program above?
1 point
Which is the correct method for creating a new list with the same values as the list referred to by the variable 'x', but in reverse order?
1 point
What does the expression, « x[ : 3 ] » evaluate to, if placed at the end of the program above?
1 point
Which is the correct method for reversing the order of the values in the list referred to by the variable, 'x'?
1 point
Which of the following are calls to mutator functions that modify an existing list rather than creating a new list in memory?
1 point
What does the expression, « x[ 3 : 0 : -1 ] » evaluate to, if placed at the end of the program above?
1 point
This form was created inside of New York University.