Python Institute PCAP-31-03 Certified Associate in Python Programming Exam Online Training
Python Institute PCAP-31-03 Online Training
The questions for PCAP-31-03 were last updated at Feb 19,2025.
- Exam Code: PCAP-31-03
- Exam Name: Certified Associate in Python Programming Exam
- Certification Provider: Python Institute
- Latest update: Feb 19,2025
What is the expected behavior of the following code?
- A . it outputs 1
- B . it outputs 2
- C . the code is erroneous and it will not execute
- D . it outputs 3
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 –
- A . <<<
- B . >>>
- C . >>
- D . <<
What can you do if you don’t like a long package path like this one?
- A . you can make an alias for the name using the alias keyword
- B . nothing, you need to come to terms with it
- C . you can shorten it to alpha. zeta and Python will find the proper connection
- D . you can make an alias for the name using the as keyword
D
Explanation:
Reference: https://stackoverflow.com/questions/706595/can-you-define-aliases-for-imported-modules-in-python
An operator able to perform bitwise shifts is coded as (select two answers)
- A . – –
- B . ++
- C . <<
- D . >>
C,D
Explanation:
Reference: https://www.geeksforgeeks.org/basic-operators-python/
What is the expected output of the following snippet?
- A . abc
- B . The code will cause a runtime exception
- C . ABC
- D . 123
The following expression
1+-2
is:
- A . equal to 1
- B . invalid
- C . equal to 2
- D . equal to -1
Which of the following lines of code will work flawlessly when put independently inside theadd_new () method in order to make the snippet’s output equal to [0, 1, 1]? (Select two answers)
- A . put self.store(1])
- B . self put stire(1])
- C . self .put self.get () [-1])
- D . self .put (self.store[1])
What is the expected output of the following code?
def foo(x,y,z):
return x(y) – x(z)
print{f00(lambda x: x % 2, 2, 1) )
- A . 1
- B . 0
- C . -1
- D . an exception is raised
What is true about Python packages? (Select two answers)
- A . the sys.path variable is a list of strings
- B . _pycache_is a folder that stores semi-completed Python modules
- 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
What is the expected output of the following code?
- A . 3
- B . 5
- C . 4
- D . an exception is raised