Lists and Tuples

Lists and Tuples

Assessment

Flashcard

Computers

KG

Practice Problem

Hard

Created by

Mercy Omwoyo

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is a list in Python?

Back

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

2.

FLASHCARD QUESTION

Front

Which of these is the correct code for creating a list of names?
Options: 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

Back

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

3.

FLASHCARD QUESTION

Front

In the list ["John", "Harry", "Jesse", "John", "Harry", "Harry"], which item has the index number of 3?

Back

John

4.

FLASHCARD QUESTION

Front

What would this code show on the screen?

Media Image

Back

5

5.

FLASHCARD QUESTION

Front

For tuples and list which is correct?

Back

List is mutable whereas tuples are immutable.

6.

FLASHCARD QUESTION

Front

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

Back

Bob

7.

FLASHCARD QUESTION

Front

Which is a correctly declared tuple?

Back

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

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?