Search Header Logo

B4 - The Single Branch if Statement

Authored by Ahmetcan türk

Other

University

Used 2+ times

B4 - The Single Branch if Statement
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

valuate the following expression:


1 + 2 == 3

true

false

unpredictable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expression:


25 < 5 * 5

true

false

unpredictable

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expression:


8 + 1 >= 3 * 3

true

false

unpredictable

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?

int height = 10;

if ( height <= 12 )

System.out.print("Low bridge: ");

System.out.println("proceed with caution.");

Nothing is written.

Low bridge:

proceed with caution.

Low bridge: proceed with caution.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?

int height = 13;

if ( height <= 12 )

System.out.print("Low bridge: ");

System.out.println("proceed with caution.");

Nothing is written.

Low bridge:

proceed with caution.

Low bridge: proceed with caution.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?

int depth = 8 ;

if ( depth >= 8 )

{

System.out.print("Danger: ");

System.out.print("deep water. ");

}

System.out.println("No swimming allowed.");

Danger:

Danger: deep water.

Danger: deep water. No swimming allowed.

deep water. No swimming allowed.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expression:

10.0 + 0.10 < 11.0

true

false

unpredictable

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?