Python Institute Certified Associate in Python Programming PCAP-31-03 Exam Questions

Page: 1 / 14
Total 147 questions
Question 1

Which of the following sentences are true? (Select two answers)



Answer : B, D


Question 2

What is the expected output of the following code if there is no file named non existing_file inside the working directory?



Answer : B


Question 3

The first parameter of each method:



Answer : D

The first argument of every class method, including init, is always a reference to the current instance of the class. By convention, this argument is always named self. In the init method, self refers to the newly created object; in other class methods, it refers to the instance whose method was called


Question 4

Python's built-in function named open () tries to open a file and returns:



Answer : C


Question 5

Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)



Answer : A, C


Question 6

There is a stream named s open for writing. What option will you select to write a line to the stream''



Answer : A


Question 7

What is true about Python class constructors? (Select two answers)



Answer : A, C


Page:    1 / 14   
Total 147 questions