wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP Computer Science Exam 2

Total questions: 12

Worksheet time: 2hrs 0mins

Name
Class
Date
1.
First Name
4 lines
2.
Last Name
4 lines
3.
How many times should the start function be defined in a program?
a)
0
b)
1
c)
2
d)
However many you like
4.
How many times should you call the start function when writing your program?
a)
0
b)
1
c)
2
d)
However many times you like
e)
Option 5
5.
Why do we use functions in programming?
a)
Break down our program into smaller parts
b)
Avoid repeating code
c)
Make our program more readable
d)
All of the above
6.
What is top down design?
a)
Top down design is a way of designing your program by starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to solve.
b)
Top down design is a way that you can create designs on a computer to put on a web page
c)
Top down design is a way of designing your programs starting with the individual commands first
d)
Top down design is a way to use loops and classes to decompose the problem
7.
What is a code comment?
a)
A way to teach Karel a new word
b)
A way to give notes to the reader to explain what your code is doing
c)
A message to your teacher in code
d)
A place to write whatever you want in your code
e)
Option 5
8.
Which answer choice describes the game with the lowest level of abstraction?
a)
The Warriors won by 10 points.
b)
The Warriors had an early lead, but were down by 4 at halftime. They tied it up in the 4th quarter and the game went into overtime. They won by 10 points in overtime.
c)
First, Steph Curry jumped in the air and grabbed the ball. Then he dribbled it three times and passed it to Klay Thompson…
d)
First, Steph Curry flexed his left and right quad muscles at the exact same time, then he flexed each muscle in his fingers…
9.
Karel needs to pick up a pile of tennis balls. Which of the following start functions solves the problem at the highest level of abstraction?
a)
A
b)
B
c)
C
d)
D
10.
Why is it important to write comments for the code segments in a program?
a)
To confuse other programmers
b)
To make the code run faster
c)
To increase the file size
d)
It is important to write comments for code segments to enhance readability, clarify complex logic, and provide documentation for future reference.
11.

What is Top Down Design?

a)
Top Down Design focuses only on coding without planning.
b)
Top Down Design is a method for debugging existing software.
c)
Top Down Design emphasizes individual components before the overall structure.
d)
Top Down Design is a systematic approach to software development where the system is designed from the top level down to the lower levels, focusing on the overall structure before addressing individual components.
12.
What is abstraction? Describe it in your OWN words.
a)
Abstraction is a technique used to reduce complexity by hiding unnecessary details and focusing on the essential features of a system.
b)
Abstraction is a method to increase complexity by adding more details.
c)
Abstraction is a process of duplicating all features of a system for clarity.
d)
Abstraction refers to the physical representation of a system's components.