Python Basic Flashcard 5 ( Lists and Tuples)

Python Basic Flashcard 5 ( Lists and Tuples)

Assessment

Flashcard

Other

6th - 8th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

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

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 following list, which item has the index number of 3?
["John", "Harry", "Jesse", "John", "Harry", "Harry"]

Back

"John"

4.

FLASHCARD QUESTION

Front

Which of these pieces of code would return the name "Harry" from the following list? nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"] Options: nameList(), nameList[1], NameList(4), nameList["4"]

Back

nameList[1]

5.

FLASHCARD QUESTION

Front

For tuples and list which is correct?

Back

List is mutable whereas tuples are immutable.

6.

FLASHCARD QUESTION

Front

Which is a correctly declared tuple? Options: a = ("orange", "yellow", "red"), a = "orange", "yellow", "red", a = ["orange", "yellow", "red"], a = "orangeyellowred"

Back

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

7.

FLASHCARD QUESTION

Front

Can you have an empty tuple z = () or an empty string w = []?

Back

yes

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?