AP COMPUTER SCIENCE PRINCIPLES FINAL EXAM
Laura will go to her friend's house if she has less than two hours of homework or if it is
the weekend. Otherwise she will stay home and study.
In which of the following cases will Laura stay home to study?
a. Laura has 1.5 hours of homework on a Tuesday
b. Laura has 4 hours of homework on a Saturday
c. Laura has 2.5 hours of homework on a Thursday
d. Laura has 1 hour of homework on a Saturday - Answers -C
If x represents the area of the number line colored yellow, which inequality accurately
reflects the value of x? (the image has an open circle on the 5, the arrow pointing
towards the right).
a. x<5
b. x>5
c. x>=5
d. x<=5 - Answers -B
Which of the following statements are true?
I. The internet connects devices and networks all over the world
II. There are no negative consequences of the internet. It is purely positive
III. The internet helps people communicate
IV. The internet helps people collaborate to solve problems - Answers -I, II, and IV
Consider the following program:
var i= 1;
var sum = 0;
while(i < 5){
sum +=
}
println(sum);
Which is the result of running this program?
a. 0 is printed
b. 15 is printed
c. 10 is printed
d. The program results in an infinite loop - Answers -D.
Which of the following successfully switches the values of the variables x and y? temp
may be used as a temporary variable if necessary.
Laura will go to her friend's house if she has less than two hours of homework or if it is
the weekend. Otherwise she will stay home and study.
In which of the following cases will Laura stay home to study?
a. Laura has 1.5 hours of homework on a Tuesday
b. Laura has 4 hours of homework on a Saturday
c. Laura has 2.5 hours of homework on a Thursday
d. Laura has 1 hour of homework on a Saturday - Answers -C
If x represents the area of the number line colored yellow, which inequality accurately
reflects the value of x? (the image has an open circle on the 5, the arrow pointing
towards the right).
a. x<5
b. x>5
c. x>=5
d. x<=5 - Answers -B
Which of the following statements are true?
I. The internet connects devices and networks all over the world
II. There are no negative consequences of the internet. It is purely positive
III. The internet helps people communicate
IV. The internet helps people collaborate to solve problems - Answers -I, II, and IV
Consider the following program:
var i= 1;
var sum = 0;
while(i < 5){
sum +=
}
println(sum);
Which is the result of running this program?
a. 0 is printed
b. 15 is printed
c. 10 is printed
d. The program results in an infinite loop - Answers -D.
Which of the following successfully switches the values of the variables x and y? temp
may be used as a temporary variable if necessary.