
Unit 4 practice question set 3
Authored by Caleb Kim
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x = 8;
int y = 7;
boolean b = x<y || x==8;
System.out.println(b);
True
False
2.
FILL IN THE BLANK QUESTION
1 min • 1 pt
What is the output of the following code?
int x = 5;
int y = 3;
if(x-- < 5 && y-->2)
System.out.print("A");
if(x==4 && ++y>1)
System.out.print("B");
if(x==y)
System.out.print("C");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x=1;
if(x<3)
System.out.println("small");
if(x<6)
System.out.println("medium");
if (x<10)
System.out.println("large");
large
small
medium
large
medium
small
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When does an || statement short-circuit?
When the left operand is false
When the right operand is true
When the right operand is false
When the left operand is true
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int x = 8;
int y = 7;
boolean b = x<y && x==8;
System.out.println(b);
True
False
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int a = 5;
if (a > 0) {
if (a < 10) {
System.out.println("Small number");
} else {
System.out.println("Large number");
}
}
Compilation error
Small number
Large number
No output
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following code when temperature is set to 75?
int temperature = 75;
if (temperature < 60) {
System.out.println("Cold");
} else if (temperature >= 60 && temperature < 80) {
System.out.println("Warm");
} else {
System.out.println("Hot");
}
no output
hot
warm
cold
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Tin học 10 _ Bài 16 _Định dạng văn bản
Quiz
•
10th - 12th Grade
10 questions
TIN 11 - PYTHON - PHÉP TOÁN - BIỂU THỨC - CÂU LỆNH GÁN
Quiz
•
11th Grade
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
10 questions
hardware and software(g3)
Quiz
•
2nd - 10th Grade
10 questions
EMPTECH L4 Q3
Quiz
•
12th Grade
10 questions
ICT 9 Quiz 1
Quiz
•
9th Grade
20 questions
Computer Fundamentals
Quiz
•
10th Grade
18 questions
End of unit assessment - Networks
Quiz
•
9th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade