
Control Structures

Flashcard
•
Computers
•
12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

17 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What will be the output of this program?
var number = 5;
var greater_than_zero = number > 0;
if (greater_than_zero){
println(number % 2);
}
Back
1
2.
FLASHCARD QUESTION
Front
What will be the output of this program?
var number = 5;
var greater_than_zero = number > 0;
if (greater_than_zero){
if (number > 5){
println(number);
}}
Back
Nothin will print
3.
FLASHCARD QUESTION
Front
What will print?
var isRaining = false;
var isCloudy = false;
var isSunny = !isRaining && !isCloudy;
var isSummer = false;
var isWarm = isSunny || isSummer;
println("Is it warm: " + isWarm);
Back
Is it warm: true
4.
FLASHCARD QUESTION
Front
What will be printed if var numApples = 10; var numOranges = 5; if(numApples < 20 || numOranges == numApples) { println("Hello, we are open!"); } else { println("Sorry, we are closed!"); } println("Sincerely, the grocery store");
Back
Hello, we are open!
Sincerely, the grocery store
5.
FLASHCARD QUESTION
Front
What will print?
var above16 = true;
var hasPermit = true;
var passedTest = false;
if (above16 && hasPermit && passedTest){ println("Issue Driver's License"); } else { if (above16 || hasPermit || passedTest) { println("Almost eligible for Driver's License"); } else { println("No requirements met."); }}
Back
Almost eligible for Driver’s License
6.
FLASHCARD QUESTION
Front
What will be printed by the following code? var numberOne = 5; var numberTwo = 10; if (numberOne == 5) { println(1); } if (numberOne > 5) { println(2); } if (numberTwo < 5) { println(3); } if (numberOne < numberTwo) { println(4); } if (numberOne != numberTwo) { println(5); }
Back
1 4 5
7.
FLASHCARD QUESTION
Front
We want to print the phrase “CodeHS is the best” exactly 25 times. What kind of control structure should we use?
Back
For loop
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Java Loops

Flashcard
•
9th - 12th Grade
12 questions
Code.org Unit 6 Assessment Day

Flashcard
•
9th - 12th Grade
15 questions
Binomial Vs Geometric Distributions

Flashcard
•
12th Grade
14 questions
Binomial Distribution - Math 4

Flashcard
•
12th Grade
19 questions
Final Review Part 2

Flashcard
•
11th Grade
15 questions
Binomial Probability

Flashcard
•
11th Grade
15 questions
Conditional Probability And Independence

Flashcard
•
12th Grade
15 questions
complex numbers

Flashcard
•
12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade