
Control Structures
Flashcard
•
Computers
•
12th Grade
•
Practice Problem
•
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
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
Small Talk in Business Contexts
Flashcard
•
KG - University
15 questions
cars
Flashcard
•
KG - University
10 questions
EKONOMI MALAYSIA BAB 1 BIL 2- PENGANGGURAN
Flashcard
•
University
10 questions
Interview Skills
Flashcard
•
University
15 questions
Flashcard sull'Orientamento e l'Orientatore
Flashcard
•
12th Grade
12 questions
Hazard Profiles and Tectonic Hazards Flashcard
Flashcard
•
11th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade