Computer Science LISTS

Quiz
•
Computers
•
12th Grade
•
Hard
Steve Rich
Used 58+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Correct code to define a list in Python?
scores = [15, 29, 4, 50]
scores = {15, 29, 4, 50}
Int[] scores = {15, 29, 4, 50};
scores = (15, 29, 4, 50)
2.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Choose all the ways in which a Python list is different from an array ...
Arrays have fixed length: Lists have dynamic length
Arrays only contain one data type; Lists can contain many data types
Arrays are indexed from 1; Lists are indexed from 0
Arrays can not be empty; Lists can be empty
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output is ...?
mango
pear
kiwi
['apple','banana','pear']
4.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Choose three valid methods that may be applied to lists in Python ...
list.append(x)
list.count(x)
list.sort()
list.format()
list.isNumeric()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
colours = ['red', 'blue', 'yellow', 'green', 'purple']
Which instruction illustrates mutability?
colours[2] = 'pink'
colours.append('pink')
colours.insert(2, 'pink')
colours.remove('pink')
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Output is ... ?
Index out of range
29
34
89
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Correct code to access the second 'Terry' in this list ... ?
montyPython[5]
montyPython[6]
montyPython[-1]
montyPython[3]
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Python Fundamentals and Programming

Quiz
•
11th - 12th Grade
20 questions
Python Recap

Quiz
•
7th Grade - University
15 questions
Section 3A: Collect and process data using lists

Quiz
•
12th Grade
15 questions
list in python

Quiz
•
10th - 12th Grade
16 questions
Python Basics

Quiz
•
KG - University
19 questions
Programming Techniques Survey

Quiz
•
8th - 12th Grade
20 questions
Python Programming Quiz

Quiz
•
9th Grade - University
15 questions
Python Basics

Quiz
•
KG - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade