Leads4pass > Python Institute > Python Institute Certifications > PCAP-31-03 > PCAP-31-03 Online Practice Questions and Answers

PCAP-31-03 Online Practice Questions and Answers

Questions 4

Which of the following invocations are valid? (Select two answers)

A. rfind("python","r")

B. sorted("python")

C. "python".sort ()

D. "python".index("th")

Buy Now
Questions 5

What is the expected output of the following snippet?

A. 3

B. 1

C. 2

D. the code is erroneous

Buy Now
Questions 6

What is the expected output of the following code?

A. 4

B. 16

C. an exception is raised

D. 1

Buy Now
Questions 7

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

A. 121 + 1 != '!' + 2 * '2'

B. 'AbC' lower () < 'AB'

C. '1' + '1' + '1' < '1' * 3'

D. '3.14' != str(3.1415)

Buy Now
Questions 8

An operator able to perform bitwise shifts is coded as (select two answers)

A. -

B. ++

C. <<

D. >>

Buy Now
Questions 9

What is the output of the following piece of code?

A. ant'bat'camel

B. ant"bat"camel

C. antbatcamel

D. ant bat camel

Buy Now
Questions 10

What can you deduce from the following statement? (Select two answers) str = open('file.txt', "rt")

A. str is a string read in from the file named file.txt

B. a newlina character translation will be performed during the reads

C. if file. txt does not exist, it will be created

D. the opened file cannot be written with the use of the str variable

Buy Now
Questions 11

What is the expected output of the following code?

A. 21

B. 2

C. 3

D. 12

Buy Now
Questions 12

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)

Buy Now
Questions 13

The simplest possible class definition in Python can be expressed as:

A. class X:

B. class X: pass

C. class X: return

D. class X: {}

Buy Now
Exam Code: PCAP-31-03
Exam Name: PCAP - Certified Associate in Python Programming
Last Update: Jul 21, 2025
Questions: 153
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99