Search Header Logo

Python Quiz

Authored by Shweta Dhareshwar

Computers

12th Grade

Used 2+ times

Python Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following object does not support indexing?

tuple

list

dictionary

set

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following data type is immutable?

list

set

tuple

dictionary

3.

OPEN ENDED QUESTION

3 mins • 1 pt

Media Image

Which of the following code gives output My friend's house is in Chennai?

Evaluate responses using AI:

OFF

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What's the main difference between Python lists and tuples?

Lists are faster and tuples are slower.

Lists can hold any data type and tuples can only contain int and str objects.

Lists are mutable and tuples are immutable.

Lists are immutable and tuples are mutable

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How do you assign a tuple of length 1 to the variable a? (Check all that are correct.)

a = 1,

a = tuple(1)

a = 1

a = [1]

a = (1,)

6.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which of the following are true of Python dictionaries?

Dictionaries can be nested to any depth.

Dictionaries are accessed by key.

A dictionary can contain any object type except another dictionary.

Dictionaries are mutable.

Items are accessed by their position in a dictionary.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

colors = ["red", "green", "burnt sienna", "blue"]

print( "yellow" in color)

What is the result of the yellow in colors expression?

ValueError: 'yellow' is not in list

4

False

3

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?