Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

Python Institute PCEP-30-02 PCEP - Certified Entry-Level Python Programmer Exam Practice Test

Page: 1 / 4
Total 42 questions

PCEP - Certified Entry-Level Python Programmer Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$37.5  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$33  $109.99
Question 1

Assuming that the phonc_dir dictionary contains namemumber pairs, arrange the code boxes to create a valid line of code which retrieves Martin Eden's phone number, and assigns it to the number variable.

Options:

Question 2

What is the expected output of the following code?

Options:

A.

1

B.

The code raises an unhandled exception.

C.

False

D.

('Fermi ', '2021', 'False')

Question 3

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

Options:

A.

Function is obliged to return a value.

B.

Every function must be defined before it is invoked.

C.

It's possible to define more than one function of the same name.

D.

A function can invoke itself.

Question 4

What is the expected output of the following code?

Options:

A.

The code is erroneous and cannot be run.

B.

ppt

C.

213

D.

pizzapastafolpetti

Question 5

Which of the following expressions evaluate to a non-zero result? (Select two answers.)

Options:

A.

2 ** 3 / A - 2

B.

4 / 2 * * 3 - 2

C.

1 * * 3 / 4 - 1

D.

1 * 4 // 2 ** 3

Question 6

Drag and drop the conditional expressions to obtain a code which outputs * to the screen.

(Note: some code boxes will not be used.)

Options:

Question 7

Insert the code boxes in the correct positions in order to build a line of code which asks the user for an Integer value and assigns it to the counter variable.

(Note: some code boxes will not be used.)

Options:

Question 8

Arrange the code boxes in the correct positions in order to obtain a loop which executes its body with the level variable going through values 5, 1, and 1 (in the same order).

Options:

Question 9

How many hashes (+) does the code output to the screen?

Options:

A.

one

B.

zero (the code outputs nothing)

C.

five

D.

three

Question 10

What is the expected output of the following code?

Options:

A.

The code produces no output.

B.

* * *

C.

* *

D.

*

Question 11

What happens when the user runs the following code?

Options:

A.

The program outputs three asterisks ( *** )to the screen.

B.

The program outputs one asterisk ( * ) to the screen.

C.

The program outputs five asterisks ( ***** ) to the screen.

D.

The program enters an infinite loop.

Question 12

Assuming that the following assignment has been successfully executed:

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

Options:

A.

the_List.index {"1"} in the_list

B.

1.1 in the_list |1:3 |

C.

len (the list [0:2]} <3

D.

the_list. index {'1'} -- 0

Page: 1 / 4
Total 42 questions