Search Header Logo

PCEP Practice Test - Python

Authored by Prakash Ash

Computers

Professional Development

Used 13+ times

PCEP Practice Test - Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

1 min • 1 pt

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

4 / 2 - 2 ** 1

4 / 2 + 2 ** 1

1 // 2 + 3 * 4

1 ** 2 - 4 // 3

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which one of the following asks the user for a string value and assigns it to the variable password ?

input = password ("Enter password")

password = input(Enter password)

password = input("Enter password")

password = str("Enter password")

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Refer to code image. Which one of the following code snippets prints the width and height variables separated by a multiplication sign (*) ?

print(width, height, *)

print(width, *, height)

print(width, height, sep='*')

print(width, height, multiply() )

Answer explanation

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given the literal "False", identify the correct data type.

Boolean

String

Integer

Float

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given the literal True, identify the correct data type.

Boolean

String

Integer

Float

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A process in which the source code is immediately executed without translating into machine code is called

linking

compilation

interpretation

debugging.

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Identify the operation that has the highest priority according to the operator precedence table in python.

Exponentiation

Multiplication

Subtraction

Floor Division

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?