Multiple choice questions are for Python lesson 1
##MCQ 1:
What will be returned when we take the following slice of the string:
string='Software Carpentry'
string[4:]
'Soft'
'ware Carpentry'
'w'
't'
##MCQ 2: What will be the output of the following code:
array=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
print(array[2][1])
8
6
4
2
##Notes on distractors:
The focus is on retrieving correct value from the array.
- Answer
- If the student reverses the indices they could get this value
- If the student forgot that indexing starts at 0 they could get this value
- If the student reversed the indices and forgot that indexing starts at 0, they could get this value