Loops Python

Quiz
•
Computers
•
9th Grade
•
Hard

Sarbagya Malla
Used 65+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be displayed on the screen when the following code is run?
esports = ["Donkey Kong", "Galaga", "Pac Man"]
print( esports[1] )
Galaga
Donkey Kong
Pac Man
Syntax error; you can't access individual list items this way
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following code?
esports = ("Donkey Kong", "Galaga", "Pac Man")
esports[1] = "Centipede"
The item at index 1 does not exist
You cannot update an item in a tuple
The [1] notation after the variable name is not valid
Nothing; this will work fine
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given a list with 3 items, what is the lowest and highest valid index number into that list?
1 and 2
0 and 2
0 and 3
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given a list named "esports", which of the following statements will access only the first and second items in that list?
esports(0:1)
esports(0:3)
esports[0:2]
esports.range(0,2)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed to the screen when the following code runs?
esports = ["Donkey Kong", "Galaga", "Pac Man"]
esports.reverse()
print(esports)
['Pac Man', 'Galaga', 'Donkey Kong']
['gnoK yeknoD', 'agalaG', naM caP']
['Donkey Kong', 'Galaga', 'Pac Man']
Error; you cannot use the reverse() function on a list
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed to the screen when the following code runs?
esports = ["Donkey Kong", "Galaga", "Pac Man"]
esports.insert(0,"Centipede")
print(esports)
['Centipede', 'Centipede', 'Centipede']
['Donkey Kong', 'Galaga', 'Pac Man', 'Centipede']
['Centipede', 'Donkey Kong', 'Galaga', 'Pac Man']
['Centipede', 'Galaga', 'Pac Man']
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed on the screen when the following code runs?
esports = ["Donkey Kong", "Galaga", "Pac Man"]
if ("Galaga" in esports):
print("Found it")
else:
print("Not here")
Both "Found it" and "Not here"
Not here
Nothing - there is no output at all
Found it
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
§`i78

Quiz
•
KG - Professional Dev...
20 questions
VideoGames

Quiz
•
KG - University
10 questions
Game knowledge

Quiz
•
5th Grade - Professio...
10 questions
Popular Video Games (2019)

Quiz
•
KG - Professional Dev...
10 questions
Quiz o E-sporcie

Quiz
•
6th Grade - Professio...
18 questions
Video games

Quiz
•
KG - Professional Dev...
10 questions
Пикселизация

Quiz
•
7th - 9th Grade
16 questions
Mindent (is) a FIRST ® LEGO ® League-ről!

Quiz
•
1st - 12th 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 Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th 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
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade
14 questions
Points, Lines, Planes

Quiz
•
9th Grade