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 # 21

If you need a function that does nothing, what would you use instead of XXX? (Select two answers)

def idler ( ):

XXX

Options:

A.  

pass

B.  

return

C.  

exit

D.  

None

Discussion 0
Question # 22

What is the expected behavior of the following code?

Question # 22

Options:

A.  

It outputs 2

B.  

It outputs 0.

C.  

It outputs 1.

D.  

It raises an exception

Discussion 0
Question # 23

What is the expected behavior of the following code?

Question # 23

Options:

A.  

the code is erroneous and it will not execute

B.  

it outputs 'tuple' object does not support item assignment

C.  

0it outputs list assignment index out of range

D.  

it outputs None

Discussion 0
Question # 24

What is the expected output of the following code?

Question # 24

Options:

A.  

4

B.  

16

C.  

an exception is raised

D.  

1

Discussion 0
Question # 25

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?

Question # 25

Options:

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

Discussion 0
Question # 26

What is the expected output of the following code?

Question # 26

Options:

A.  

a

B.  

an exception is raised

C.  

b

D.  

c

Discussion 0
Question # 27

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

Options:

A.  

rfind("python","r")

B.  

sorted("python")

C.  

"python".sort ()

D.  

"python".index("th")

Discussion 0
Question # 28

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

Question # 28

Options:

A.  

BB

B.  

CC

C.  

AA

D.  

BC

Discussion 0
Question # 29

What is the expected behavior of the following snippet?

Question # 29

It will:

Options:

A.  

cause a runtime exception

B.  

print 1

C.  

print 0 , [1]

D.  

print [1J

Discussion 0
Question # 30

The__bases__property contains:

Options:

A.  

base class locations (addr)

B.  

base class objects (class)

C.  

base class names (str)

D.  

base class ids (int)

Discussion 0

Free Exams Sample Questions