0% found this document useful (0 votes)
261 views

Certified Associate in Python Programming: Python Institute PCAP-31-03 Dumps Available Here at

This document contains sample questions and answers from the Python Institute PCAP-31-03 certification exam. It includes 10 multiple choice questions covering topics like Python classes, lambda functions, slicing, operators, modules, and packages. The document also provides a link to purchase the full PDF file with additional exam questions and answers.

Uploaded by

hk python123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
261 views

Certified Associate in Python Programming: Python Institute PCAP-31-03 Dumps Available Here at

This document contains sample questions and answers from the Python Institute PCAP-31-03 certification exam. It includes 10 multiple choice questions covering topics like Python classes, lambda functions, slicing, operators, modules, and packages. The document also provides a link to purchase the full PDF file with additional exam questions and answers.

Uploaded by

hk python123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Python Institute PCAP-31-03

Certified Associate in Python Programming


Python Institute PCAP-31-03 Dumps Available Here at:
https://www.certification-questions.com/python-institute-exam/pcap-31-03-dumps.html

Enrolling now you will get access to 110 questions in a unique set of
PCAP-31-03 dumps

Question 1
A property that stores information about a given class's super-classes is named:

Options:

A. _upper_

B. _bases_

C. _ancestors_

D. _super_

Answer: B

Question 2
Which of the following lambda function definitions are correct? (Select two answers)

Options:

A. lambda X : None

B. lambda : 3,1415

C. lambda x : def fun(x): return x

D. lambda lambda: lambda * lambda

Answer: A, B

Question 3
The following class hierarchy is given. What is the expected output of the code?

https://www.certification-questions.com
Python Institute PCAP-31-03

Options:

A. BB

B. CC

C. AA

D. BC

Answer: D

Question 4
Assuming that String is six or more letters long, the following slice
String[1:-2]
is shorter than the original string by:

Options:

A. four chars

https://www.certification-questions.com
Python Institute PCAP-31-03

B. three chars

C. one char

D. two chars

Answer: B

Question 5
Assuming that the V variable holds an integer value to 2, which of the following operators
should be used instead of OPER to make the expression equal to 1?
V OPER 1 -

Options:

A. <<<

B. >>>

C. >>

D. <<

Answer: C

Question 6
What is the expected output of the following snippet?

Options:

A. abc

B. The code will cause a runtime exception

https://www.certification-questions.com
Python Institute PCAP-31-03

C. ABC

D. 123

Answer: B

Explanation:

Question 7
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?

Options:

A. print (get(self))

B. print (self.get())

https://www.certification-questions.com
Python Institute PCAP-31-03

C. print (get())

D. print (self.get (val))

Answer: B

Question 8
A compiler is a program designed to (select two answers)

Options:

A. rearrange the source code to make it clearer

B. check the source code in order to see if its correct

C. execute the source code

D. translate the source code into machine code

Answer: B, D

Explanation:
houghtco.com/what-is-a-compiler-958322
Explanation:

Question 9
A Python module named pymod.py contains a variable named pyvar.
Which of the following snippets will let you access the variable? (Select two answers)

Options:

A. import pyvar from pymod pyvar = 1

B. from pymod import pyvar = 1

C. from pymod import pyvar pyvar ()

D. import pymod pymod.pyvar = 1

Answer: A, D

Question 10
What is true about Python packages? (Select two answers)

Options:

A. the sys.path variable is a list of strings

B. _pycache_is a folder that stores semi-completed Python modules

https://www.certification-questions.com
Python Institute PCAP-31-03

C. a package contents can be stored and distributed as an mp3 file

D. a code designed to initialize a package's state should be placed inside a file named init.py

Answer: B, D

Would you like to see more? Don't miss our PCAP-31-03


PDF file at:
https://www.certification-questions.com/python-institute-pdf/pcap-31-03-pdf.html

https://www.certification-questions.com

You might also like