Python Institute Certified Associate in Python Programming - PCAP-31-02 Exam Practice Test

What will the value of the i variable be when the following loop finishes its execution?
Correct Answer: C
What can you deduce from the following statement0 (Select two answers) str = open('file.txt', "rt")
Correct Answer: A,C
If you need to serve two different exceptions called Ex1 and Ex2 in one except branch, you can write:
Correct Answer: B
A variable stored separately in every object is called:
Correct Answer: C
What can you do if you don't like a long package path like this one?
Correct Answer: A
Which of the listed actions can be applied to the following tuple? (Select two answers)
Correct Answer: B,C
The following class definition is given. We want the show () method to invoke the get () method, and then output the value the get () method returns.
Which of the invocations should be used instead of XXX?
Correct Answer: B
What is the expected output of the following snippet?
Correct Answer: B