
Understanding Lists in Python

Quiz
•
Information Technology (IT)
•
7th Grade
•
Medium

John Heatley
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to create a list of fruits in Python?
fruits = "apple", "banana", "cherry"
fruits = ["apple", "banana", "cherry"]
fruits = {"apple", "banana", "cherry"}
fruits = ("apple", "banana", "cherry")
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first element of the list `numbers = [10, 20, 30, 40]`?
numbers[1]
numbers[0]
numbers(0)
numbers.first()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python colours = ["red", "blue", "green"] print(colours[2]) ```
"red"
"blue"
"green"
"colours"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following creates an empty list in Python?
empty = ()
empty = []
empty = {}
empty = ""
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the list `animals = ["cat", "dog", "rabbit"]`, what does `animals[1]` return?
"cat"
"dog"
"rabbit"
1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of "banana" in the list `fruits = ["apple", "banana", "cherry"]`?
0
1
2
3
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the last element of the list `numbers = [5, 10, 15, 20]` using a negative index?
numbers[-1]
numbers[-2]
numbers[3]
numbers[4]
Create a free account and access millions of resources
Similar Resources on Wayground
17 questions
Основи програмування на Python

Quiz
•
7th Grade
20 questions
informatika 7 tes

Quiz
•
7th Grade
16 questions
While Loop Iteration Quiz

Quiz
•
7th Grade
20 questions
Python Iteration and Selection Quiz

Quiz
•
7th Grade
20 questions
Year 8 AI HOMEWORK 2

Quiz
•
7th Grade
17 questions
Quiz về kiểu dữ liệu Str

Quiz
•
6th - 8th Grade
20 questions
Python Basics: IDLE and Variables Quiz

Quiz
•
7th Grade
20 questions
Основы Python

Quiz
•
6th - 8th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Information Technology (IT)
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
24 questions
Flinn Lab Safety Quiz

Quiz
•
5th - 8th Grade
22 questions
Figurative Language

Quiz
•
7th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade