Search Header Logo

List and Tuples

Authored by Lakeisha Fuller

Computers

9th - 12th Grade

Used 159+ times

List and Tuples
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of these is the best description of a list in Python?

A list is a collection of data that has an order and can be changed

A list is a lot of variables

A list is used for shopping

A list is a collection of data that cannot hold duplicated data and cannot be changed

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of these is the correct code for creating a list of names?

nameList = John, Harry, Jesse, John, Harry, Harry

nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList = [John, Harry, Jesse, John, Harry, Harry]

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What would this code show on the screen?

7

6

5

4

An error

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

For tuples and list which is correct?

List and tuples both are mutable.

List is mutable whereas tuples are immutable.

List and tuples both are immutable.

List is immutable whereas tuples are mutable

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

people = ["John", "Rob", "Bob"]
print (people[-1])
What would this result be?

John
Rob
Bob
Error

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which is a correctly declared tuple?

a = ("orange", "yellow", "red")

a = "orange", "yellow", "red"

a = ["orange", "yellow", "red"]

a = "orangeyellowred"

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which line of code will give you an error? b = (4, 5, 6, 7, 8)

b[2]

b[0] = 1

b[:3]

b[-2]

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?