
Chapter 4 (Decision Structures)
Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

20 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Is this code segment correct?
if(quizScore == 10)
System.out.println("Perfect score");
Back
Yes
2.
FLASHCARD QUESTION
Front
WHICH TYPE OF DECISION STRUCTURE IS THIS?
Back
Nested If
3.
FLASHCARD QUESTION
Front
What decision structure works best if you have more than two possible answers (multiple choice) to a question, and those answers can be integer or character based?
Back
A Switch statement
4.
FLASHCARD QUESTION
Front
Of the following if statements, which one correctly executes three instructions if the condition is true?
Options: if (x < 0)
a = b * 2;
y = x;
z = a – y;
, {
if (x <0)
a = b*2;
y=x;
z=a-y;
}, if { (x < 0)
a = b * 2;
y = x;
z = a – y;
}, if (x <0)
{
a = b*2;
y = x;
z = a - y;
Back
if (x <0)
{
a = b*2;
y = x;
z = a - y;
5.
FLASHCARD QUESTION
Front
Which of the sets of statements below will add 1 to x if x is positive and subtract 1 from x if x is negative but leave x alone if x is 0? Options: if (x > 0) x++;
else x--;
, if (x > 0) x++;
else if (x < 0) x--;
, if (x > 0) x++;
if (x < 0) x--;
else x = 0;
, if (x == 0) x = 0;
else x++;
x--;
Back
if (x > 0) x++;
else if (x < 0) x--;
6.
FLASHCARD QUESTION
Front
How would you check for inequality?
Back
!=
7.
FLASHCARD QUESTION
Front
Is this code segment correct?
if(quizScore == 10);
System.out.println("Perfect score");
Back
No
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
15 questions
Linear Relationships
Flashcard
•
9th - 12th Grade
15 questions
Monomials Flashcard
Flashcard
•
9th Grade - University
15 questions
Slope: Mixed Review
Flashcard
•
KG - University
15 questions
Pre Alg Diagnostic Test (Term 3)
Flashcard
•
9th Grade - University
15 questions
How Can I Smell Things From a Distance - Learning Set #2 Review
Flashcard
•
KG - University
15 questions
thursday review
Flashcard
•
9th Grade - University
15 questions
Triangle Similarity & Pythagorean Theorem
Flashcard
•
9th Grade - University
15 questions
Semester Exam 2024 Flashcard 1
Flashcard
•
9th Grade - University
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade