Winter Sale Flat 65% Limited Time Discount offer - Ends in 0d 00h 00m 00s - Coupon code: suredis

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

Demo: 12 questions
Total 42 questions

PCEP - Certified Entry-Level Python Programmer Questions and Answers

Question 1

Drag and drop the code boxes in order to build a program which prints Unavailable to the screen.

(Note: one code box will not be used.)

Options:

Question 2

What is the expected result of running the following code?

Options:

A.

The code prints 1 .

B.

The code prints 2

C.

The code raises an unhandled exception.

D.

The code prints 0

Question 3

What is the expected output of the following code?

Options:

A.

The code produces no output.

B.

* * *

C.

* *

D.

*

Question 4

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

Options:

Question 5

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 6

Assuming that the phone_dir dictionary contains name:number pairs, arrange the code boxes to create a valid line of code which adds Oliver Twist's phone number (5551122333) to the directory.

Options:

Question 7

What is the expected result of the following code?

Options:

A.

5

B.

2

C.

1

D.

The code will cause an unhandled

Question 8

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 9

What happens when the user runs the following code?

Options:

A.

The code outputs 3.

B.

The code outputs 2.

C.

The code enters an infinite loop.

D.

The code outputs 1.

Question 10

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

Options:

A.

one

B.

zero (the code outputs nothing)

C.

five

D.

three

Question 11

What is the expected output of the following code?

Options:

A.

5

B.

4

C.

6

D.

The code raises an exception and outputs nothing.

Question 12

What happens when the user runs the following code?

Options:

A.

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

B.

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

C.

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

D.

The program enters an infinite loop.

Demo: 12 questions
Total 42 questions