Exam2pass
0 items Sign In or Register
  • Home
  • IT Exams
  • Guarantee
  • FAQs
  • Reviews
  • Contact Us
  • Demo
Exam2pass > 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

The following class hierarchy is given. What is the expected out of the code?

A. BB

B. CC

C. AA

D. BC

Buy Now

Correct Answer: D

Questions 5

What will be the value of the i variable when the while e loop finishes its execution?

A. 1

B. 0

C. 2

D. the variable becomes unavailable

Buy Now

Correct Answer: A

Questions 6

What is the expected output of the following snippet?

A. 3

B. 1

C. 2

D. the code is erroneous

Buy Now

Correct Answer: A

Questions 7

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

A. 11 == '011'

B. 3 * 'a' < 'a' * 2

C. 'abc' .upper () < 'abc'

D. '1' + '2' * 2 !=2 '12'

Buy Now

Correct Answer: CD

Questions 8

If you want to transform a string into a list of words, what invocation would you use? (Select two answers)

Expected output:

A. s.split ()

B. split (s, "~ "~)

C. s.split ("~ "~)

D. split (s)

Buy Now

Correct Answer: AC

Questions 9

Is it possible to safely check if a class/object has a certain attribute?

A. yes, by using the hasattr attribute

B. yes, by using the hasattr ( ) method

C. yes, by using the hassattr ( ) function

D. no, it is not possible

Buy Now

Correct Answer: B

Reference: https://stackoverflow.com/questions/610883/how-to-know-if-an-object-has-an- attribute-in-python

Questions 10

Which of the following lambda definitions are correct? (Select two answers)

A. lanbda x, y; return x\\y - x%y

B. lambda x, y: x//y - x%y

C. lambda (x, y = x\\y x%y

D. lambda x, y: (x, y)

Buy Now

Correct Answer: BD

Questions 11

Which of the following statements are true? (Select two answers)

A. open () is a function which returns an int that represents a physical file handle

B. the second open () argument is optional

C. instd, outstd, errstd are the names of pre-opened streams

D. if invoking open () fails, the value None is returned

Buy Now

Correct Answer: AB

Questions 12

Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers) string = 'SKY' (:: -1) string = string (-1)

A. string is None

B. string (0) == string (-1

C. string (0) == 'Y'

D. len (string) == 1

Buy Now

Correct Answer: CD

Questions 13

What is the expected output of the following code?

A. abcef

B. The program will cause a runtime exception error

C. acdef

D. abdef

Buy Now

Correct Answer: B

Exam Code: PCAP-31-03
Exam Name: PCAP - Certified Associate in Python Programming
Last Update: Jun 06, 2025
Questions: 153

PDF (Q&A)

$45.99
ADD TO CART

VCE

$49.99
ADD TO CART

PDF + VCE

$59.99
ADD TO CART

Exam2Pass----The Most Reliable Exam Preparation Assistance

There are tens of thousands of certification exam dumps provided on the internet. And how to choose the most reliable one among them is the first problem one certification candidate should face. Exam2Pass provide a shot cut to pass the exam and get the certification. If you need help on any questions or any Exam2Pass exam PDF and VCE simulators, customer support team is ready to help at any time when required.

Home | Guarantee & Policy |  Privacy & Policy |  Terms & Conditions |  How to buy |  FAQs |  About Us |  Contact Us |  Demo |  Reviews

2025 Copyright @ exam2pass.com All trademarks are the property of their respective vendors. We are not associated with any of them.