PCEP Practice Exam 5

PCEP Practice Exam 5

10th Grade

•

30 Qs

quiz-placeholder

Similar activities

Unit #1 Trinity - Quizizz Review Game

Unit #1 Trinity - Quizizz Review Game

10th Grade

•

27 Qs

The early Church

The early Church

10th - 11th Grade

•

25 Qs

Rabee' Quiz Competition

Rabee' Quiz Competition

8th - 12th Grade

•

25 Qs

دراسات إسلامية ثاني

دراسات إسلامية ثاني

2nd Grade - University

•

25 Qs

Ramadan 2020

Ramadan 2020

2nd Grade - Professional Development

•

25 Qs

The virtues of Ramadan

The virtues of Ramadan

2nd Grade - University

•

25 Qs

Paramahamsa Vishwananda

Paramahamsa Vishwananda

9th Grade - University

•

26 Qs

Ramayana and Mahabharat Quiz

Ramayana and Mahabharat Quiz

6th - 10th Grade

•

27 Qs

PCEP Practice Exam 5

PCEP Practice Exam 5

Assessment

Quiz

•

Religious Studies

•

10th Grade

•

Practice Problem

•

Medium

Created by

Henry Vo

Used 16+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is incorrect:

An indentation in Python language is mandatory

The '#' is used as single line comments and the """ """ (triple quote) is used as multi-line comments

We don't need to declare the type of a variable in Python program

All of these are correct.

Answer explanation

Python is indentation-strict language. We can use # for single line comments or triple quotes for multiple-line comments (usually called DocStrings). Python is a dynamically typed language so we don't need to declare the variable data type.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will the output be when the following code is executed?

"Robert, 123455667, Dar es salaam "

Robert 123455667 Dar es salaam

SyntaxError

Robert' 123455667 'Dar es salaam '

Answer explanation

Multiple variables can be assigned values as shown in the example above. Keep in mind that we must have the same number of variables and values, otherwise we will get one of the following errors depending on the situation: TypeError: cannot unpack non-iterable int object if the number of values on the right side is less than the number of variables on the left side. ValueError: too many values to unpack if the number of values on the right side is larger than the number of variables on the left side.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output when the following code is executed?

\n:\n:\n

:

:

:

Three blank lines

error

Answer explanation

The end = "\n\n\n" will append three newline characters (\n) after printing out the text. Since there are no objects provided to the print() function to be printed, only the three empty lines will be printed. The sep is redundant in this code as there is no text to be printed.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output when the following code is executed?

25

256

error

25.6

Answer explanation

The int function will round down to the previous whole number, in this case 25.

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following statements is incorrect (select all that apply):

The bool("123") will return True

The bool("") will return True

The bool({}) will return False

The bool(-1) will return False

Answer explanation

The bool function when provided an empty string, empty object, or zero, will return False. In any other case, it will return True. bool("") evaluates to False as it is an empty string and the bool(-1) evaluates True as -1 is a non-zero value.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would be the output of the following code:

1

2

4

25

Answer explanation

The exponentiation will take precedence over modulo, hence the above expression can be simplified to 2 % 25 . The remainder of the division of 25 by 2 is 2.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output when the following code is executed?

False

True

SyntaxError

error

Answer explanation

The if condition will evaluate to False as since p is not less than 10, q is not greater than 20 and r is not greater than 30. Hence the else block will get executed. Note: In this example, all of the conditions in the if statement evaluate to False. However in another scenario, even if only one of them is False, the if block would not get executed.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?