Which of these is the correct code for creating a list of names?
lists and dictionaries in python smsmb

Quiz
•
Computers
•
11th - 12th Grade
•
Medium
Vaishali Lamba
Used 67+ times
FREE Resource
60 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
List items have an index number. In the following list, which item has the index number of 3?
["John", "Harry", "Jesse", "John", "Harry", "Harry"]
"John"
"Harry"
"Jesse"
"John"
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these pieces of code would return the name "Harry" from the following list?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList()
nameList[1]
NameList(4)
nameList["4"]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The list needs one more name added to the end - "Felipe". Which piece of code below would do this?
nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]
nameList.append(Felipe)
append(nameList,"Felipe")
nameList.append["Felipe",7]
nameList.append("Felipe")
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To insert an the string "strawberries" in the first position of a list we use
fruit.append("strawberries, 1")
fruit.insert("strawberries",0)
fruit.insert(1, "strawberries")
fruit.insert(0, "strawberries")
Create a free account and access millions of resources
Similar Resources on Quizizz
57 questions
CS: Python Unit 1 Review

Quiz
•
9th - 12th Grade
62 questions
Chapter 1: Preparing a PowerPoint Presentation

Quiz
•
12th Grade
55 questions
Пользовательские функции и процедуры

Quiz
•
11th Grade
56 questions
Ôn tập kiểm tra giữa học kỳ 2

Quiz
•
9th - 12th Grade
55 questions
untitled

Quiz
•
12th Grade - University
55 questions
K11 - Giữa HK II - CS Cánh diều

Quiz
•
11th Grade
59 questions
Working with Files

Quiz
•
8th - 12th Grade
58 questions
M3 R5 Chapter 7

Quiz
•
12th Grade - University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade