
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
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
16 questions
Barriers of physician-patient relationships inprofessionalism
Flashcard
•
University
10 questions
Disney descendants flashcard
Flashcard
•
KG
12 questions
Present perfect Vs past tense
Flashcard
•
University
15 questions
Parts of speech: general review
Flashcard
•
11th - 12th Grade
15 questions
AP Biology Genetics Flashcard
Flashcard
•
12th Grade - University
15 questions
"The Importance of Being Earnest"
Flashcard
•
12th Grade - University
11 questions
Genetic Engineering Concepts
Flashcard
•
11th Grade - University
10 questions
SUP E3 - PART 1
Flashcard
•
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