NEW
Font size
WorksheetsAP Computer Science Midterm Practice
Total questions: 38
Worksheet time: 19mins
I only
II only
I and III
II and III
include ← (floor > 10) OR (bedrooms = 3)
include ← (floor ≥ 10) AND (bedrooms = 3)
include ← (floor ≤ 10) OR (bedrooms = 3)
include ← (floor ≤ 10) AND (bedrooms = 3)
1, 3
3, 3
3, 4
4, 4
It allows programmers to implement algorithmic solutions to otherwise unsolvable problems.
It eliminates the need for programmers to test completed programs.
It enables programmers to create programs that use the lowest-level abstractions available.
It helps programmers identify errors as components are added to a working program.
A student is writing a program to model different real-world events using simulations. Which of the following simulations will generate a result that would best be stored using a Boolean variable?
A simulation of flipping a fair coin
A simulation of rolling a fair die (with sides numbered 1 through 6)
A simulation of the temperature in a location over time
A simulation of traffic patterns on a road
Code segment I displays the correct average, but code segment II does not.
Code segment II displays the correct average, but code segment I does not.
Both code segments display the correct average, but code segment I requires more arithmetic operations than code segment II.
Both code segments display the correct average, but code segment II requires more arithmetic operations than code segment I.
Program A and program B display identical values.
Program A and program B display the same values in different orders.
Program A and program B display the same number of values, but the values differ.
Program A and program B display a different number of values.
Program I correctly moves the robot to the gray square, but program II does not.
Program II correctly moves the robot to the gray square, but program I does not.
Both program I and program II correctly move the robot to the gray square
Neither program I nor program II correctly moves the robot to the gray square.
Participants who read more were generally more likely to say they are interested in the application.
Participants who read more were generally less likely to say they are interested in the application.
Participants who use a smartphone more were generally more likely to say they read more.
Participants who use a smartphone more were generally less likely to say they read more.
end - start + 1
( (end - start) / 5) + 1
end - start + 6
5 * (end - start) + 1
Byte pair encoding is an example of a lossy transformation because it discards some of the data in the original string.
Byte pair encoding is an example of a lossy transformation because some pairs of characters are replaced by a single character.
Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.
Byte pair encoding is an example of a lossless transformation because it can be used to transmit messages securely.
III only
I and II only
I and III only
I, II, and III
A= true, B= false, C= false, D= false
A= true, B= true, C= false, D= false
A= false, B= false, C= true, D= true
A= fase, B= false, C= false, D= true
Max ( Max ( a, b ) , c)
Max ( a, b ) + Max ( b, c ) - Max ( a, c )
Max ( a, b ) - Max ( b, c )
( Max ( a, b ) + Max ( b, c )) / 2
adjustedTotal Max (midtermExam, final exam)
adjustedTotal Max (midtermExam, final exam) + final exam
adjustedTotal Max (midtermExam, final exam) + midtermExam
adjustedTotal 2 * Max (midtermExam, final exam)
Concat (Substring ("Harp" , 1, 1), Substring ("Puppy" , 2, 4))
Concat (Substring ("Harp" , 1, 2), Substring ("Puppy" , 3, 3))
Concat (Substring ("Harp" , 1, 2), Substring ("Puppy" , 4, 2))
Concat (Substring ("Harp" , 2, 2), Substring ("Puppy" , 4, 2))
Between line 6 and line 7
Between line 9 and line 10
Between line 20 and 21
Between line 21 and 22
4 times as many addresses are available.
96 times as many addresses are available.
24 times as many addresses are available.
296 times as many addresses are available.
An archive containing previous versions of the e-book
The author and title of the e-book
The date the e-book was first published
The genre of the e-book (e.g., comedy, fantasy, romance, etc.)
III only
I and II only
I and III only
I, II, and III
Using video file formats that conform to published standards and are supported across many different devices
Using lossy compression software to reduce the size requirements of the data being stored
Using storage media that can be expanded for additional data capacity
Using a system that incorporates redundancy to handle disk failure
(NOT P) AND (NOT Q)
(NOT P) AND Q
NOT (P AND Q)
NOT (P OR Q)
counter > 0.5 * total
total > 0.5 * counter
counter < 0.5 * total
total < 0.5 * counter
An overflow error occurred.
The precision of the result is limited due to the constraints of using a floating-point representation.
The program attempted to execute the operation with the arguments in reverse order.
The program attempted to represent a floating-point number as an integer.
The procedure returns true when the user inputs the value "y" and returns false otherwise.
The procedure returns true when the user inputs the value "n" and returns false otherwise.
The procedure returns true no matter what the input value is.
The procedure returns false no matter what the input value is.
I only
II only
I and III
II and III
"BANANA"
"LEVEL_UP"
"MEET_ME_LATER"
"NEITHER_HERE_NOR_THERE"
The program displays the sum of the even integers from 0 to 10.
The program displays the sum of the even integers from 0 to 20.
The program displays the sum of the odd integers from 1 to 9.
The program displays the sum of the odd integers from 1 to 19.
30.6
31.2
31.8
32.4
The mobile app release did not have any effect on the average number of daily messages sent per user.
The mobile app release discouraged new user registration on the site.
The mobile app release led to users being less frequently active on the site.
The mobile app release led to users tending to write shorter messages.
4
6
7
8
I only
II only
II and III only
I, II, and III
