Pre-Winter Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 65pass65

Free Certified Associate in Python Programming Practice Questions

Exams4sure Dumps

Exam style questions across every PCAP-31-03 domain

Last Update 3 days ago
Total Questions : 154

Start with our free PCAP-31-03 practice questions, carefully crafted to mirror the domains, phrasing, and difficulty of the real PCAP exam. Each PCAP-31-03 exam question comes with a detailed rationale that explains not just which answer is correct but why the others fall short. That's how concepts stick. Use the free set to benchmark yourself: identify your Python Institute weak domains, see where you're losing marks, and build a focused study plan in minutes.

PCAP-31-03 PDF

PCAP-31-03 PDF (Printable)
$54.25
$154.99

PCAP-31-03 Testing Engine

PCAP-31-03 PDF (Printable)
$59.5
$169.99

PCAP-31-03 PDF + Testing Engine

PCAP-31-03 PDF (Printable)
$74.55
$212.99
Question # 11

Is it possible to safely check if a class object has a certain attribute0

Options:

A.  

yes, by using the hasattr attribute

B.  

yes. by using the hasattr () method

C.  

yes, by using the hasattr () function

D.  

no, it is not possible

Discussion 0
Question # 12

What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?

Question # 12

Options:

A.  

0

B.  

-1

C.  

an errno value corresponding to file not found

D.  

2

Discussion 0
Question # 13

What is the expected behavior of the following code?

Question # 13

It will

Options:

A.  

print 2 1

B.  

print 1 2

C.  

cause a runtime exception

D.  

print

Discussion 0
Question # 14

What can you do if you don't like a long package path tike this one0 import alpha.beta.gamma.delta.epsiIon.zeta

Options:

A.  

you can make an alias for the name using the a 1 i a s 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 die as keyword

Discussion 0
Question # 15

A compiler is a program designed to (select two answers)

Options:

A.  

rearrange the source code to make it clearer

B.  

check the source code in order to see if its correct

C.  

execute the source code

D.  

translate the source code into machine code

Discussion 0
Question # 16

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

Expected output:

Question # 16

Options:

A.  

s.split ()

B.  

split (s, "˜ "˜)

C.  

s.split ("˜ "˜)

D.  

split (s)

Discussion 0
Question # 17

Which one of the platform module functions should be used to determine the underlying platform name?

Options:

A.  

platform.uname ()

B.  

platform.platform ()

C.  

platform.python_version()

D.  

platform.processor()

Discussion 0
Question # 18

What is true about Python packages? (Select two answers)

Options:

A.  

the__name__variable content determines the way in which the module was run

B.  

a package can be stored as a tree of sub-directories/sub-folders

C.  

__pycache__is the name of a built-in variable

D.  

hashbang is the name of a built-in Python function

Discussion 0
Question # 19

Which of the following expressions evaluate to True?

A)

Question # 19

B)

Question # 19

C)

Question # 19

D)

Question # 19

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Question # 20

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

Options:

A.  

121 +1 == int ('1' + 2 * '2')

B.  

float ('3.14') == str('3.'+'14')

C.  

'xyz'.lower() 'XY'

D.  

'8' + '8' !=2 * '8'

Discussion 0

Free Exams Sample Questions