Which keyword is used to execute code only if a condition is true? Options: if, else, while, for

Conditionals Test Review

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
if
2.
FLASHCARD QUESTION
Front
Which statement will be executed if the condition in an if statement is false? Options: The if block, The else block (if provided), The program will stop, The code will execute regardless of the condition
Back
The else block (if provided)
3.
FLASHCARD QUESTION
Front
How do you write a condition to check if a variable x is equal to 5? Options: x == 5, x = 5, x === 5, x != 5
Back
x == 5
4.
FLASHCARD QUESTION
Front
How do you write a condition to check if a variable x is not equal to 5?
Back
x != 5
5.
FLASHCARD QUESTION
Front
What is the AND operator in Java?
Back
&&
6.
FLASHCARD QUESTION
Front
What is the OR operator in Java?
Back
||
7.
FLASHCARD QUESTION
Front
What will be the output of the following code?
int a = 1;
if (a > 3) {
println("Greater than 3");
} else {
println("Not greater than 3");
}
Back
Not greater than 3
Create a free account and access millions of resources
Similar Resources on Quizizz
9 questions
Python Review 5/23

Flashcard
•
9th - 12th Grade
11 questions
Java Boolean Statements

Flashcard
•
11th Grade
10 questions
Python booleans & if/elif/else

Flashcard
•
9th - 12th Grade
14 questions
Javascript Control Structures Practice

Flashcard
•
9th - 12th Grade
12 questions
Robotics II Coding Review

Flashcard
•
9th - 12th Grade
8 questions
AP CS A Flashcard 4 Practice

Flashcard
•
9th - 12th Grade
7 questions
Truth Tables PEI

Flashcard
•
9th - 12th Grade
14 questions
Python If Else Statements

Flashcard
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University