Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Python Institute PCAP PCAP-31-03 Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam PCAP-31-03 Premium Access

View all detail and faqs for the PCAP-31-03 exam


833 Students Passed

93% Average Score

96% Same Questions
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

Which of the equations are True? (Select two answers)

Options:

A.

chr (ord (x)) = = x

B.

ord (ord (x)) = = x

C.

chr (chr (x)) = = x

D.

ord (chr (x)) = = x

Questions # 32:

Which of the listed actions can be applied to the following tuple? (Select two answers)

Options:

A.

tup [:]

B.

tup.append (0)

C.

tup [0]

D.

del tup

Questions # 33:

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

Options:

A.

open () requires a second argument

B.

open () is a function which returns an object that represents a physical file

C.

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

D.

if invoking open () fails, an exception is raised

Questions # 34:

What is the expected behavior of the following code?

Question # 34

It will:

Options:

A.

print 4321

B.

print

C.

cause a runtime exception

D.

print 1234

Questions # 35:

Python strings can be “glued” together using the operator:

Options:

A.

.

B.

&

C.

_

D.

+

Questions # 36:

Assuming that String is six or more letters long, the following slice

String[1:-2]

is shorter than the original string by:

Options:

A.

four chars

B.

three chars

C.

one char

D.

two chars

Questions # 37:

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

Options:

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

Questions # 38:

What is the expected output of the following code?

Question # 38

Options:

A.

abcef

B.

The program will cause a runtime exception error

C.

acdef

D.

abdef

Questions # 39:

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

Options:

A.

Python strings are actually lists

B.

Python strings can be concatenated

C.

Python strings can be sliced like lists

D.

Python strings are mutable

Questions # 40:

What is the expected output of the following snippet?

Question # 40

Options:

A.

abc

B.

The code will cause a runtime exception

C.

ABC

D.

123

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.