PCEP-30-02: Certified Entry-Level Python Programmer
PCEP-30-02: Certified Entry-Level Python Programmer practice questions, page 2 of 20, with answer review and explanations.
Question 6
Take a look at the snippet, and choose the true statements: (Choose two.)
- nums is longer than vals
- nums and vals are of the same length
- vals is longer than nums
- nums and vals refer to the same list
Question 7
What is the output of the following snippet?
- 12
- (2, 1)
- (1, 2)
- 21
Question 8
What is the expected output of the following code? print(list('hello'))
- hello
- [h, e, l, l, o]
- ['h', 'e', 'l', 'l', 'o']
- ['h' 'e' 'l' 'l' 'o']
- None of the above.
Question 9
What will be the output of the following code snippet?
- [1, 3, 5, 7, 9]
- [8, 9]
- [1, 2, 3]
- [1, 2]
Question 10
What will be the output of the following code snippet?
- 3
- 2
- 4
- 1