Search Header Logo

Python 71-105

Authored by Enjoyer Bro

Specialty

University

Used 8+ times

Python 71-105
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to define a dictionary in Python?

{'key': 'value'}

{key = value}

['key', 'value']

(key, value)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python keyword is used to create a generator?

yield

return

generate

create

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does list.pop() do?

Removes and returns the last item in a list.

Adds an item to the end of a list.

Removes an item by index.

Clears the list.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to check for membership in a sequence?

in

of

has

contains

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print("PYTHON".lower())?

python

PYTHON

Python

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which Python method is used to replace parts of a string?

replace()

change()

update()

switch()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will print(list(range(5))) output?

[0, 1, 2, 3, 4]

[1, 2, 3, 4, 5]

[5, 4, 3, 2, 1]

[0, 1, 2, 3, 4, 5]

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?