Conditionals Test Review

Conditionals Test Review

Assessment

Flashcard

Computers

9th - 12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

12 questions

Show all answers

1.

FLASHCARD QUESTION

Front

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

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?