Search Header Logo

Python Assessment Quiz

Authored by Adam Gijebi

Computers

Professional Development

Python Assessment Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following tools can be used to run Python programs?

Python Interpreter

Jupyter Notebook

IDE (e.g., PyCharm, VSCode)

All of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What is the output of the following code?

int

float

complex

str

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What will the following code print?

ytho

yth

Pyt

Py

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of the following is NOT a valid operation for a Python dictionary?

Adding a new key-value pair

Updating a value for an existing key

Deleting a key-value pair

Slicing the dictionary

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Media Image

What will be the output of the following code?

0 1 2

0 1

1 2

0 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to define a function in Python?

function

def

lambda

func

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of the finally block in exception handling?

It runs only if no exception occurs.

It is used to raise an exception.

It executes regardless of whether an exception occurred or not.

It is a synonym for the else block.

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?