
B4 - The if Statement
Quiz
•
Other
•
University
•
Practice Problem
•
Hard

Ahmetcan türk
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many choices are possible when using a single if-else statement?
1
2
3
4
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code fragment write to the monitor?
int sum = 14;
if ( sum < 20 )
System.out.print("Under ");
else
{
System.out.print("Over ");
System.out.println("the limit.");
}
Under
Over
Under the limit
Over the limit
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code fragment write to the monitor?
int sum = 7;
if ( sum > 20 )
{
System.out.print("You win ");
}
else
{
System.out.print("You lose ");
}
System.out.println("the prize.");
You win
You lose
You win the prize.
You lose the prize.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code fragment write to the monitor?
int sum = 21;
if ( sum != 20 )
System.out.print("You win ");
else
System.out.print("You lose ");
System.out.println("the prize.");
You win
You lose
You win the prize
You lose the prize
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Evaluate (to true or false) each of the following expressions:
14 <= 14 14 < 14 -9 > -25 -25 > -9
true true true true
true false false false
true false true true
true false true false
Similar Resources on Wayground
10 questions
THE PATASOLA
Quiz
•
KG - Professional Dev...
10 questions
UPU_Int.Org_2024A
Quiz
•
University
10 questions
QUIZ KOMBEL KHD GEYER
Quiz
•
University
10 questions
GOT7
Quiz
•
University
10 questions
Informative Speaking
Quiz
•
University
10 questions
TARIFF MANAGEMENT 7 QUIZ 2
Quiz
•
University
10 questions
Wrap Up: Industri Pariwisata & Ekonomi Kreatif class UTS
Quiz
•
University
10 questions
PSY2101 Learning
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Other
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
