Question 1
Insert the correct snippet so that the program produces the expected output. Expected output: Code:
- b = 0 not in list
- b = list[0]
- b = 0 in list
- b = False
Question 2
Assuming that the tuple is a correctly created tuple, the fact that tuples are immutable means that the following instruction:
- is illegal
- may be illegal if the tuple contains strings
- can be executed if and only if the tuple contains at least two elements
- is fully correct
Question 3
What is the expected output of the following code?
- 2
- 4
- 5
- 3
Question 4
What is the expected output of the following code?
- [1, 3]
- [1, 4]
- [4, 3]
- [1, 3, 4]
Question 5
What is the expected output of the following code?
- ['Peter', 404, 3.03, 'Wellert', 33.3]
- None of the above.
- [404, 3.03]
- ['Peter', 'Wellert']