NEW
Font size
WorksheetsAPCSA Unit 3 FQ
Total questions: 21
Worksheet time: 15mins
5
10
10 == 10
true
false
3
5
8
true
false
x = 8 and y = 25
x = 10 and y = 10
x = 10 and y = 30
x = 15 and y = 30
x = 25 and y = 30
x = -1 y = -1
x = 2 y = 1
x = 3 y = 2
x = 4 y = -1
x = 4 y = 3
7
9
14
21
27
20.0
25.0
70.0
75.0
95.0
randomNumber = 0.70;
randomNumber = 0.80;
randomNumber = 0.85;
randomNumber = 0.90;
randomNumber = 1.00;
isLeapYear(1900)
isLeapYear(1984)
isLeapYear(2000)
isLeapYear(2001)
isLeapYear(2010)
degrees = 90;
degrees = 94;
degrees = 95;
degrees = 96;
The code will work as intended for all values of degrees.
choice < 5
choice >= 5 and choice <= 10
choice > 10
choice == 5 or choice == 10
There is no value for choice that will cause the two code segments to produce different output.
The two code segments print the same value only when grade is below 80.
The two code segments print the same value only when grade is 90 or above or grade is below 80.
The two code segments print the same value only when grade is 90 or above.
Both code segments print the same value for all possible values of grade.
The two code segments print different values for all possible values of grade.
I only
II only
III only
I and II only
I, II, and III
First
Second
Third
FirstThird
SecondThird
5
6
9
10
16
a = true, b = true, x = -1
a = true, b = false, x = 3
a = true, b = false, x = 7
a = false, b = true, x = 3
a = false, b = false, x = 11
Expression I and expression II evaluate to different values for all values ofA and B.
Expression I and expression II evaluate to the same value for all values ofA and B.
Expression I and expression II evaluate to the same value only when A and B are the same.
Expression I and expression II evaluate to the same value only when A and B differ.
Expression I and expression II evaluate to the same value whenever A istrue.
boolean b2 = false || (17 % 3 == 2);
boolean b2 = false && (17 % 3 == 2);
boolean b2 = true || (17 % 3 == 1);
boolean b2 = (true || false) && true;
boolean b2 = (true && false) || true;
A
B
C
D
Nothing is printed.
false
false
false
false
false
true
true
false
false
true
false
true
true
true
true
one dot equals two
one dot equals two
one dot equals three
one dot equals three
two equals equals three
one dot equals two
one dot equals three
two equals equals three
Nothing is printed.
