Summer Special 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

What is true about exceptions and debugging? (Select two answers.)

Options:

A.

A tool that allows you to precisely trace program execution is called a debugger.

B.

If some Python code is executed without errors, this proves that there are no errors in it.

C.

One try-except block may contain more than one except branch.

D.

The default (anonymous) except branch cannot be the last branch in the try-except block.

Question 2

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 3

Arrange the code boxes in the correct positions to form a conditional instruction which guarantees that a certain statement is executed when the temperature variable is equal to 0. 0.

Options:

Question 4

What is true about exceptions in Python? (Select two answers.)

Options:

A.

According 10 Python terminology, exceptions are thrown

B.

According to Python terminology, exceptions are raised

C.

Python's philosophy encourages developers to make all possible efforts to protect the program from the occurrence of an exception.

D.

Not more than one except branch can be executed inside one try-except block.

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

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

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 8

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

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

Options:

Question 9

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 10

What is true about tuples? (Select two answers.)

Options:

A.

Tuples are immutable, which means that their contents cannot be changed during their lifetime.

B.

The len { } function cannot be applied to tuples.

C.

An empty tuple is written as { } .

D.

Tuples can be indexed and sliced like lists.

Question 11

Arrange the binary numeric operators in the order which reflects their priorities, where the top-most position has the highest priority and the bottom-most position has the lowest priority.

Options:

Question 12

What is the expected result of the following code?

Options:

A.

5

B.

2

C.

1

D.

The code will cause an unhandled

Demo: 12 questions
Total 42 questions