Computer Science LISTS

Quiz
•
Computers
•
12th Grade
•
Hard
Steve Rich
Used 59+ 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
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
18 questions
Final Test Python Code

Quiz
•
9th - 12th Grade
16 questions
Python Review

Quiz
•
9th - 12th Grade
15 questions
Programming python review

Quiz
•
9th - 12th Grade
20 questions
Тест "Конкурс проф. мастерства"

Quiz
•
12th Grade
15 questions
Python Built-in Functions

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

Quiz
•
12th Grade
18 questions
Kiểu dữ liệu xâu kí tự trong Python

Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade