Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Python Institute PCEP-30-02 - PCEP - Certified Entry-Level Python Programmer

Page: 1 / 1
Total 30 questions

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).

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.

What is the expected result of the following code?

A.

The code is erroneous and cannot be run.

B.

20

C.

10

D.

30

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

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.

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

A.

2 ** 3 / A - 2

B.

4 / 2 * * 3 - 2

C.

1 * * 3 / 4 - 1

D.

1 * 4 // 2 ** 3

What is the expected result of the following code?

A.

5

B.

2

C.

1

D.

The code will cause an unhandled

Python Is an example of which programming language category?

A.

interpreted

B.

assembly

C.

compiled

D.

machine

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

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

What is the expected output of the following code?

A.

2

B.

0

C.

3

D.

1