CodeHS APCSP Python
Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Thomas Martinez
FREE Resource
Enhance your content in a minute
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT true about tuples?
Tuples are ordered.
Tuples are immutable.
Tuples can contain elements of different types.
Tuples use parentheses to access individual elements, rather than square brackets.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to declare a tuple?
x = (1, 2, 3)
x = [1, 2, 3]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following Python programs creates a list with the numbers 1 through 5?
my_list = (1, 2, 3, 4, 5)
my_list = [1, 2, 3, 4, 5]
my_list = 1, 2, 3, 4, 5
my_list = "1, 2, 3, 4, 5"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code snippets will correctly convert a string to a list?
my_string = "hello"
str_as_list = list(my_string)
my_string = "hello"
str_as_list = listify(my_string)
my_string = "hello"
str_as_list = make_list(my_string)
my_string = "hello"
str_as_list = new_list(my_string)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code print?
time_of_day = ["morning", "afternoon", "evening"]
for word in time_of_day:
print("Good " + word)
Good morning, Good afternoon, Good evening
Good morning
Good afternoon
Good evening
Good morning
Good morning
Good morning
Good morning
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What code below will print the following?
Letter 1: T
Letter 2: i
Letter 3: m
name = "Tim"
name_list = list(name)
for index, value in enumerate(name_list):
print("Letter " + str(index+1) + ": " + value)
name = "Tim"
name_list = list(name)
for index, value in (name_list):
print("Letter " + str(index+1) + ": " + value)
name = "Tim"
name_list = list(name)
for index in enumerate(name_list):
print("Letter " + str(index) + ": " + value)
name = "Tim"
name_list = list(name)
for index, value in enumerate(name_list):
print(value + str(index))
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Look at the following program:
my_list = ["bananas", "oranges", "grapes", "pineapples", "apples"]
# You pick the code that goes here...
# ...
# ...
print(my_list)
Pick the code that results in the following output:
['apples', 'bananas', 'grapes', 'oranges', 'pineapples']
my_list.sort()
my_list.reverse()
my_list.sort()
my_list.reverse()
my_list.remove("grapes")
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
CALL: Causative Verb
Quiz
•
10th - 11th Grade
12 questions
website design elements
Quiz
•
12th Grade
10 questions
TIN 11- KIỂU XÂU
Quiz
•
11th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
15 questions
حاسب 2
Quiz
•
10th Grade
13 questions
python A
Quiz
•
10th Grade
15 questions
Ethical and Social Issues in ICT
Quiz
•
10th Grade
10 questions
analisis data dan visualisasi data
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
