Python Institute
PCAP-31-03
Q1:
The__bases__property contains:
○
A
base class locations (addr)○
B
base class objects (class)○
C
base class names (str)○
D
base class ids (int)
Python Institute
PCAP-31-03
Q2:
What is true about Python packages? (Select two answers)
☐
A
the__name__variable always contains the name of a package☐
B
a package is a group of related modules☐
C
the pyc extension is used to mark semi-compiled Python packages☐
D
a package is a single file whose name ends with the pa extension
Python Institute
PCAP-31-03
Q3:
What is true about Object-Oriented Programming in Python? (Select two answers)
☐
A
encapsulation allows you to protect some data from uncontrolled access☐
B
the arrows on a class diagram are always directed from a superclass towards its subclass☐
C
inheritance is the relation between a superclass and a subclass☐
D
an object is a recipe for a class
Python Institute
PCAP-31-03
Q4:
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)


☐
A
put (self.prop + vaI)☐
B
self.put (self.get ( ) + vaI)☐
C
self.put (get ( ) + vaI)☐
D
self.put (self.prop + vaI)
Python Institute
PCAP-31-03
Q5:
Executing the following snippet

will cause the dct:
○
A
to hold two keys named 'pi' linked to 3.14 and 3.1415 respectively○
B
to hold two key named 'pi' linked to 3.14 and 3.1415○
C
to hold one key named 'pi' linked to 3.1415○
D
to hold two keys named 'pi' linked to 3.1415