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

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

Uploaded by

Vinayak Shegar
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)
47 views

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

Uploaded by

Vinayak Shegar
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

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