Big Idea 3 Unit Test Part A: Programming Fundamentals (3.1-3.9) | AP CSP Practice Test
Big Idea 3 Unit Test Part A: Programming Fundamentals (3.1-3.9)
📋 Unit Test instructions
Part A of the Big Idea 3 test covers programming fundamentals, topics 3.1 through 3.9.
Answer all 14 questions, then press Submit test. You will see your score, which questions you missed, and the correct answer with an explanation. Passing is 70%, the AP benchmark. You can retake it.
Consider the following program. What is displayed?
a <- 4 b <- 7 a <- b b <- a + 2 DISPLAY(a) DISPLAY(b)
A program stores 40 student scores. Instead of 40 separately named variables, the programmer uses one list called scores. In terms of data abstraction, what is the main advantage of the list?
In this expression, MOD has the same precedence as multiplication and division, which is higher than addition. What does the program display?
total <- 3 + 14 MOD 4 DISPLAY(total)
Using standard order of operations, what does the program display?
result <- 2 + 3 * 4 - 1 DISPLAY(result)
Consider the following program that uses string concatenation and the LENGTH procedure. What is displayed?
name <- "AP" name <- name + "CSP" DISPLAY(LENGTH(name))
Given a <- 5 and b <- 8, which of the following conditions evaluate to true?
- I. (a < b) AND (b < 10)
- II. NOT (a = b)
- III. (a > b) OR (b < a)
Consider the following program. What is displayed?
x <- 10
IF ((x > 5) AND NOT (x > 12))
{
DISPLAY("A")
}
ELSE
{
DISPLAY("B")
}The program below uses two separate IF statements, not an IF/ELSE. What is displayed?
n <- 6
IF (n MOD 2 = 0)
{
DISPLAY("even")
}
IF (n > 5)
{
DISPLAY("big")
}Consider the following program with nested conditionals. What is displayed?
age <- 16
hasLicense <- "no"
IF (age >= 16)
{
IF (hasLicense = "yes")
{
DISPLAY("Can drive")
}
ELSE
{
DISPLAY("Needs license")
}
}
ELSE
{
DISPLAY("Too young")
}Consider the following program. What is displayed?
sum <- 1
REPEAT 4 TIMES
{
sum <- sum * 2
}
DISPLAY(sum)Consider the following program. What value is displayed?
n <- 1
REPEAT UNTIL (n > 5)
{
n <- n + 2
}
DISPLAY(n)The two code segments below run on the same value of x. Do they always assign the same final value to y?
Segment 1:
IF (x > 10)
{
y <- 1
}
IF (x > 5)
{
y <- 2
}
Segment 2:
IF (x > 5)
{
y <- 2
}
IF (x > 10)
{
y <- 1
}You need an algorithm that displays the larger of two distinct numbers stored in a and b. Which algorithm always does this correctly?
A programmer already has a tested algorithm that checks whether an input is a valid whole number, and a separate tested algorithm that computes a shipping cost. To build a program that validates the input and then computes the cost, which approach best reflects developing an algorithm by combining existing ones?
Get in Touch
Whether you're a student, parent, or teacher — I'd love to hear from you.
Just want free AP CS resources?
Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]