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

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

Home (https://www.certshero.com/)
› Python Institute (https://www.certshero.com/python-institute) › PCAP-31-03

Python Institute PCAP-31-03 Certified Associate in Python


Programming Exam Practice Test

Page: 1 / 14 Want more questions? Get Premium Access.


( Click To See Details )
Total 144 questions

Questions & Answers PDF Web-Based Practice Test Demo

Question 1

Which of the following expression evaluate to True? (Select two answers)

A)

B)

C)

D)

A Option A
B Option B
C Option C
D Option D

Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 1/6
4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

Reveal Answer

Answer : C, D

Next Question

Question 2

With regards to the directory structure below, select the proper forms of the
directives in order to import module_c. (Select two answers)

A from pypack.upper.lower import module_c


B import pypack.upper.lower.module_c
C import upper.module_c
D import upper.lower.module_c

Reveal Answer

Answer : A, B

Next Question
Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 2/6
4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

Question 3

What is the expected output of the following code if the file named
existing_text_file is a non-zero length text file located inside the working
directory?

A the length of the first line from the file


B -1
C the number of lines contained inside the file
D the length of the last line from the file

Reveal Answer

Answer : B

Next Question

Question 4

What is true about Python class constructors? (Choose two.)


A there can be more than one constructor in a Python class
B the constructor must return a value other than None
Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 3/6
4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

C the constructor is a method named __init__


D the constructor must have at least one parameter

Reveal Answer

Answer : A, C

Next Question

Question 5

What is the expected behavior of the following code?

It will
A print 2 1
B print 1 2
C cause a runtime exception
D print <generator object f at (some hex digits)>

Reveal Answer

Answer : B

Next Question Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 4/6
4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

Question 6

What is the expected behavior of the following code?

It will:
A print 0
B cause a runtime exception
C prints 3
D print an empty line

Reveal Answer

Answer : B

Next Question

Question 7

If you need to serve two different exceptions called Ex1 and Ex2 in one
except branch, you can write:
A except Ex1 Ex2:
B except (ex1, Ex2):
C except Ex1, Ex2:
D except Ex1+Ex2:
Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 5/6
4/4/24, 5:38 PM Python Institute PCAP-31-03 Exam Practice Test Instant Access - No Installation Required

Reveal Answer

Answer : D

Next Question

Page: 1 / 14
Previous Page Next Page
Total 144 questions

2024 certshero.com. All rights reserved.

All Products (https://www.certshero.com/vendors) Guarantee (https://www.certshero.com/guarantee)


Privacy Policy (https://www.certshero.com/privacy-policy) F.A.Q. (https://www.certshero.com/faqs)
DMCA (https://www.certshero.com/dmca) Contact Us (https://www.certshero.com/contact)
About Us (https://www.certshero.com/about-us)

Leave a message

https://www.certshero.com/python-institute/pcap-31-03/practice-test 6/6

You might also like