Weekend Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

PCAP-31-03 Sample Questions Answers

Questions 4

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

Options:

A.

.

B.

&

C.

_

D.

+

Buy Now
Questions 5

What is the expected output of the following snippet?

Options:

A.

abc

B.

The code will cause a runtime exception

C.

ABC

D.

123

Buy Now
Questions 6

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

Buy Now
Questions 7

What is the expected output of the following code?

Options:

A.

3

B.

5

C.

4

D.

an exception is raised

Buy Now
Questions 8

What is the expected behavior of the following code?

It will:

Options:

A.

print 0

B.

cause a runtime exception

C.

prints 3

D.

print an empty line

Buy Now
Questions 9

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'

Buy Now
Questions 10

A property that stores information about a given class's super-classes is named:

Options:

A.

_upper_

B.

_bases_

C.

_ancestors_

D.

_super_

Buy Now
Questions 11

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

Options:

A.

BB

B.

CC

C.

AA

D.

BC

Buy Now
Questions 12

What is the expected behavior of the following code?

Options:

A.

it outputs False

B.

it outputs True

C.

it raises an exception

D.

it outputs nothing

Buy Now
Questions 13

What is the expected output of the following snippet?

Options:

A.

the code is erroneous

B.

3

C.

7

D.

15

Buy Now
Questions 14

Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)

Options:

A.

'var' in Object.__dict__

B.

'prop' in Class.__dict

C.

len(Object.__diet__) == 1

D.

'var1 in Class, dict

Buy Now
Questions 15

You are going to read just one character from a stream called s. Which statement would you use?

Options:

A.

ch = read(s, 1)

B.

ch = s. input(1)

C.

ch = input(s, 1)

D.

ch = s. read(l)

Buy Now
Questions 16

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

Buy Now
Questions 17

With regards to the directory structure below, select the proper forms of the directives in order to import module_c. (Select two answers)

Options:

A.

from pypack.upper.lower import module_c

B.

import pypack.upper.lower.module_c

C.

import upper.module_c

D.

import upper.lower.module_c

Buy Now
Questions 18

What is the expected output of the following snippet?

Options:

A.

True False

B.

True True

C.

False False

D.

False True

Buy Now
Questions 19

What is the expected behavior of the following code?

Options:

A.

it raises an exception

B.

it outputs True

C.

it outputs False

D.

it outputs nothing

Buy Now
Questions 20

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

Buy Now
Questions 21

With regards to the directory structure below, select the proper forms of the directives in order to import module_a. (Select two answers)

Options:

A.

import pypack.module_a

B.

import module_a from pypack

C.

import module_a

D.

from pypack import module_a

Buy Now
Questions 22

Which of the following snippets will execute without raising any unhandled exceptions? (Select answers)

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Exam Code: PCAP-31-03
Exam Name: Certified Associate in Python Programming
Last Update: May 11, 2024
Questions: 145
$64  $159.99
$48  $119.99
$40  $99.99
buy now PCAP-31-03