LISTS in Python

Flashcard
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

20 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
Which of these codes is correct for creating a list of numbers? Options: num = ('10','29','37','109'), num = ['10','29','37','109'], num == ('10','29','37','109'), num = ['10 29 37 109']
Back
num = ['10','29','37','109']
6.
FLASHCARD QUESTION
Front
How do I remove something from a list?
Back
variable.remove()
7.
FLASHCARD QUESTION
Front
Which code would I use to add an item to a list? Options: variable.add(), variable.append(), append.variable(), add.variable()
Back
variable.append()
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
General Knowledge

Flashcard
•
KG - University
15 questions
General Knowledge

Flashcard
•
KG - University
20 questions
Pub Flashcard

Flashcard
•
University
15 questions
WIP Icebreaker Flashcard

Flashcard
•
University
15 questions
Comparatives-Superlatives-Possessive pronouns

Flashcard
•
KG - University
16 questions
Winter Movie Trivia

Flashcard
•
University
15 questions
General Knowledge

Flashcard
•
KG - University
15 questions
General Knowledge

Flashcard
•
KG - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University