
AP CSP Unit 4 Quiz 1 PRACTICE
Authored by Scott Chamberlain
Computers
9th - 12th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
"The <missing phrase> structure in Python executes a series of statements continuously for a set number of iterations." Which of the following expressions would best be used in place of <missing phrase> to make the above sentence true?
If
Repeat n times
While
For
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is false?
Scratch is a block-based programming language; therefore, there is no possibility of syntax errors.
Scratch is a drag-and-drop text based programming language; therefore, it introduces the possibility of syntax errors.
Python is a text-based programming language; therefore, it introduces the possibility of syntax errors.
Python allows users to create a wide variety of programs with its text-based programming constructs.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following Python code print?
46
55
65
Nothing will be printed - the loop never stops.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programmer completes the user manual for a video game she has developed and realizes she wants to swap the names of two characters, “Shockwave” and “Rain.” She already completed the manual, so she wants to write a program to swap where those names appear in the text.
Consider the programmer’s goal of changing all occurrences of “Shockwave” to “Rain” and all occurrences of “Rain” to “Shockwave.” The programmer will use the fact that the name, “Dreamer” does not appear anywhere in the original text.
Which of the following algorithms can be used to accomplish this?
First, change all occurrences of “Shockwave” to “Dreamer” and then change all occurrences of “Dreamer” to “Rain”.
First, change all occurrences of “Shockwave” to “Dreamer,” then change all occurrences of “Dreamer” to “Rain” and then change all occurrences of “Rain” to “Shockwave”.
First, change all occurrences of “Shockwave” to “Dreamer,” then change all occurrences of “Rain” to “Shockwave” and then change all occurrences of “Dreamer” to “Rain”.
First, change all occurrences of “Shockwave” to “Dreamer,” then change all occurrences of “Dreamer” to “Rain” and then change all occurrences of “Shockwave” to “Rain”.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following Python code print? You may assume x, y, and z are integers.
The largest of the three numbers x, y, and z
The smallest of the three numbers x, y, and z
The median of the three numbers x, y, and z
The number printed cannot be predicted based on the relative sizes of the three numbers x, y, and z
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following procedures.
What is displayed as a result of executing the following program if fn = Tim, mn = Berners and ln = Lee?
Tim Berners Lee Lee Berners Tim
Lee Berners Tim Tim Berners Lee
Tim Berners Lee Berners Tim
Lee Berners Tim Berners Lee
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an effective way of finding and correcting errors?
Deleting the code segments are restarting that section of code
Posting on a bunch of coding forums online waiting for a coding master to help you
Changing every variable name in your program
Using extra output statements to check values of variable at different points in the program
Access all questions and much more by creating a free account
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
11 questions
Cascading Style Sheets
Quiz
•
8th - 12th Grade
10 questions
EMPTECH L4 Q2
Quiz
•
12th Grade
10 questions
PRE-ASSESSMENT ETECH M1
Quiz
•
12th Grade
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
10 questions
Data Engineering y BigQuery V1
Quiz
•
12th Grade
10 questions
ETWINNING SID EVENT 24
Quiz
•
1st - 12th Grade
10 questions
Vertex AI Pipelines V1
Quiz
•
12th Grade
10 questions
Working with tables
Quiz
•
5th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade