
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
18 questions
Java Basics MP1 Test 3

Flashcard
•
11th Grade
15 questions
AP Stats Probability

Flashcard
•
12th Grade - University
16 questions
Q3-2 Review Questions

Flashcard
•
11th Grade
15 questions
ARRAYLIST - JAVA

Flashcard
•
University
16 questions
Lesson 3.5 - If Structures Practice

Flashcard
•
11th Grade
9 questions
CT FLASHCARD Mars 2025

Flashcard
•
KG - University
9 questions
CT FLASHCARD Mars 2025

Flashcard
•
KG - University
15 questions
Binomial & Geometric Distribution Practice

Flashcard
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade