AP CSP Unit 4 Quiz 1 PRACTICE

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
Scott Chamberlain
Used 2+ times
FREE Resource
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
Similar Resources on Wayground
12 questions
History of Computers

Quiz
•
6th - 12th Grade
11 questions
EMTECH Q3W1 QUIZ 1

Quiz
•
12th Grade
10 questions
Website Development - Lesson 2 Retrieval

Quiz
•
11th Grade
10 questions
Website Development 1 - Recall

Quiz
•
11th Grade
8 questions
AP CSP Unit 3 Quiz 2 PRACTICE

Quiz
•
9th - 12th Grade
8 questions
AP Computer Science Principles Unit 4 Review

Quiz
•
9th - 12th Grade
6 questions
Emtech 1

Quiz
•
12th Grade
10 questions
QUIZ HTML PERTEMUAN KE 2 KELAS 11

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade