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 3 out of 5 pages
Viewing questions 21-30 out of questions
Questions # 21:

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

Options:

A.

str(1-1) in '012345£739'[:2]

B.

'phd' in 'alpha'

C.

'deb' not in 'abcde' [::-1]

D.

'True' not in 'False'

Questions # 22:

What is the expected output of the following code?

Question # 22

Options:

A.

a

B.

an exception is raised

C.

b

D.

c

Questions # 23:

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'

Questions # 24:

What is a true about python class constructors? (Select two answers)

Options:

A.

the constructor must have at least one parameter

B.

the constructor must return a value other than None

C.

the constructor is a method named_init_

D.

there can the more than one constructor in a Python class.

Questions # 25:

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

Options:

A.

class X:

B.

class X:

pass

C.

class X:

return

D.

class X: {}

Questions # 26:

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

Questions # 27:

What is the expected output of the following snippet?

Question # 27

Options:

A.

1

B.

4

C.

2

D.

3

Questions # 28:

What is true about Object-Oriented Programming in Python? (Select two answers)

Options:

A.

encapsulation allows you to protect some data from uncontrolled access

B.

the arrows on a class diagram are always directed from a superclass towards its subclass

C.

inheritance is the relation between a superclass and a subclass

D.

an object is a recipe for a class

Questions # 29:

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

Options:

A.

a code point is a point inside the code when execution stops immediately

B.

an escape sequence can be recognized by the # sign put in front of it.

C.

UTF-8 is one of the ways of representing UNICODE code points.

D.

ASCII is the name of a character coding standard

Questions # 30:

How many lines does the following snippet output?

Question # 30

Options:

A.

three

B.

one

C.

two

D.

four

Viewing page 3 out of 5 pages
Viewing questions 21-30 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.