Understanding Lists and Mutability in Coding

Understanding Lists and Mutability in Coding

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

11 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Which is the correct way to access the first element of a list 'myList'? Options: myList[1], myList[0], myList.first(), myList[None]

Back

myList[0]

2.

FLASHCARD QUESTION

Front

What is the output of the following code? Options: hello, world, ['hello','world'], [1]

Media Image

Back

world

3.

FLASHCARD QUESTION

Front

Which is the correct way to access the second element of a list 'myList'? Options: myList[1], myList[0], myList.first(), myList[None]

Back

myList[1]

4.

FLASHCARD QUESTION

Front

What is the output of the following code?

Media Image

Back

2

5.

FLASHCARD QUESTION

Front

What is the output of the following code?

Media Image

Back

5

6.

FLASHCARD QUESTION

Front

What will be the output of the following code?
Options:
[1, 10, 3, 4, 5],
[1, 2, 3, 4, 5],
[10, 2, 3, 4, 5],
[1, 2, 10, 4, 5]

Media Image

Back

[1, 10, 3, 4, 5]

7.

FLASHCARD QUESTION

Front

What does the term 'mutable' mean?

Back

It can be changed

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?