Exit demo PCEP-30-02 PCEP - Certified Entry-Level Python Programmer PDF format · free preview

Python Institute PCEP-30-02 - Questions & Answers

Free preview · every answer includes a full explanation

Product page: https://prepkeys.com/pcep-30-02.html

Question 1
Single choice

What is the expected result of the following code?

A.

5

B.

2

C.

1

D.

The code will cause an unhandled

Question 2
Single choice

What happens when the user runs the following code?

A.

The code outputs 3.

B.

The code outputs 2.

C.

The code enters an infinite loop.

D.

The code outputs 1.

Question 3
Single choice

What is the expected output of the following code?

A.

The code outputs nothing.

B.

3

C.

1

D.

4

Question 4
Single choice

What is the expected output of the following code?

A.

5

B.

4

C.

6

D.

The code raises an exception and outputs nothing.

Question 5
Single choice

A set of rules which defines the ways in which words can be coupled in sentences is called:

A.

lexis

B.

syntax

C.

semantics

D.

dictionary

Question 6
Single choice

What happens when the user runs the following code?

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 7
Multiple choice

Which of the following are the names of Python passing argument styles? (Select two answers.)

A.

keyword

B.

reference

C.

indicatory

D.

positional

Question 8
Single choice

What is the expected output of the following code?

A.

2

B.

0

C.

3

D.

1

Question 9
Multiple choice

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.

Question 10
Single choice

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

A.

one

B.

zero (the code outputs nothing)

C.

five

D.

three

Showing 10 of 420 questions · Unlock the full set