Python Institute Certified Associate in Python Programming - PCAP-31-03 Exam Practice Test
What can you deduce from the following statement? (Select two answers)
str = open('file.txt', "rt")
str = open('file.txt', "rt")
Correct Answer: B,D
Vote an answer
Which of the following lines of code will work flawlessly when put independently inside the inc ( ) method in order to make the snippet's output equal to 3? (Select two answers)




Correct Answer: A,D
Vote an answer
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:
String[1:-2]
is shorter than the original string by:
Correct Answer: A
Vote an answer
What is the expected output of the following snippet?


Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
A property that stores information about a given class's super-classes is named:
Correct Answer: B
Vote an answer
If you want to access an exception object's components and store them in an object called e, you have to use the following form of exception statement
Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
What can you do if you don't like a long package path like this one?


Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).
Which of the following expressions evaluate to True? (Select two answers)
Correct Answer: C,D
Vote an answer
The following class hierarchy is given. What is the expected output of the code?


Correct Answer: C
Vote an answer
What will be the value of the i variable when the while e loop finishes its execution?


Correct Answer: D
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).


