What will be the output of the following code: mylist = ['apple', 'banana', 'cherry']; print(mylist[1])?

Python Lists Quiz

Quiz
•
Computers
•
6th Grade
•
Easy
Ayaka Ikawa
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
cherry
banana
apple
orange
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to create a list in Python?
mylist = 'apple', 'banana', 'cherry'
mylist = ['apple', 'banana', 'cherry']
mylist = ('apple', 'banana', 'cherry')
mylist = {'apple', 'banana', 'cherry'}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first element of a list named 'fruits'?
fruits[first]
fruits[-1]
fruits[1]
fruits[0]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of 'cherry' in the list ['apple', 'banana', 'cherry']?
1
3
0
2
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to add an item to the end of a list?
add()
append()
insert()
extend()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you remove the item 'banana' from the list ['apple', 'banana', 'cherry']?
remove('banana')
pop('banana')
delete('banana')
discard('banana')
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of len(['apple', 'banana', 'cherry'])?
2
3
4
5
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
Variables & Lists

Quiz
•
6th Grade
10 questions
Python3

Quiz
•
4th Grade - University
20 questions
Basic Python Quiz for Beginners

Quiz
•
3rd - 6th Grade
20 questions
STEM quiz

Quiz
•
KG - 6th Grade
15 questions
Python Programming

Quiz
•
5th Grade - University
10 questions
ข้อสอบ เรื่อง List

Quiz
•
6th Grade
10 questions
BGE Festive Quiz

Quiz
•
6th - 8th Grade
15 questions
Scratch Text Operators

Quiz
•
KG - Professional Dev...
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
20 questions
Final Exam Vocabulary

Quiz
•
6th Grade
11 questions
Decimal/fraction conversions quick check

Quiz
•
5th - 7th Grade
10 questions
Identifying equations

Quiz
•
KG - University
49 questions
How Well Do You Know Your 6th Grade Teachers?

Quiz
•
6th Grade
5 questions
Multiply Decimals

Lesson
•
5th - 6th Grade
10 questions
Adding and Subtracting Decimals

Quiz
•
6th Grade
33 questions
Mechanical Energy Transfer

Quiz
•
6th Grade