.
Unit 5 AP CSP Code.org

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Sara Kazemi
Used 1K+ times
FREE Resource
33 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Every time someone clicks the "addItemButton", she would like the variable to increase by 1.
What code should Jasmine insert where it says <missing code> in order for her app to work?
cart total = 1;
cartTotal + 1;
cartTotal = cartTotal +1;
var cartTotal = cartTotal + 1;
var cartTotal + 1;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jose is writing a reply function for a text messaging app. He'd like to swap the sender and receiver so that the value currently in variable From ends up as the value in To and To ends up in From
Which of the following code segments will correctly swap the values as described?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer wrote an essay for his history class, and realized he has confused the names of Benjamin Franklin and Alexander Graham Bell. Instead of going through the whole paper and changing the names, he used the following incorrect algorithm in an attempt replace every occurrence of "Benjamin Franklin" with "Alexander Graham Bell" and vise versa:
First, change all occurrences of "Benjamin Franklin" to "apple" Then, change all occurrences of "apple" to "Alexander Graham Bell". Then, change all occurrences of "Alexander Graham Bell" to "Benjamin Franklin".
Here is an example of one of the sentences from the paper:
Alexander Graham Bell was born 141 years before Benjamin Franklin, so he was never able to telephone his neighbors.
Which of the following is the result of running the described incorrect algorithm on the sentence above?
Benjamin Franklin was born 141 years before Alexander Graham Bell, so he was never able to telephone his neighbors.
apple was born 141 years before Benjamin Franklin, so he was never able to telephone his neighbors.
Alexander Graham Bell was born 141 years before apple, so he was never able to telephone his neighbors.
Benjamin Franklin was born 141 years before Benjamin Franklin, so he was never able to telephone his neighbors.
Alexander Graham Bell was born 141 years before Alexander Graham Bell, so he was never able to telephone his neighbors.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following images is the most likely outcome of the drawing?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is displayed by the console.log statement after the following code segment executes?
value is: 2
value is: 2.3333333
value is: 3
value is: 4
value is: c
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A student decides to draw a series of three dots (sort of like a snowman) as shown in the diagram. She wants each dot to be half the radius of the previous dot, and for the center to be on the edge of the dot below it. She writes the following code segment to do it.
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
APCSA Unit 4 test

Quiz
•
9th Grade
30 questions
CodeHS Tracy the Turtle Final Test

Quiz
•
6th - 10th Grade
28 questions
Python slicing

Quiz
•
10th Grade
34 questions
code.org Unit 3 Review

Quiz
•
9th - 12th Grade
31 questions
T-Level DPDD: Selection Programming Concepts Quiz

Quiz
•
11th Grade
30 questions
AP CSP| S2 Final Exam Review

Quiz
•
12th Grade
30 questions
AP Computer Science Principles Units 1-3

Quiz
•
9th - 12th Grade
28 questions
AP Computer Science Final Review

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
Discover more resources for Computers
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade