B4 - The if Statement

B4 - The if Statement

University

5 Qs

quiz-placeholder

Similar activities

Quiz KKL Online Angk 2019

Quiz KKL Online Angk 2019

University

10 Qs

SAS MATA PELAJARAN PILIHAN "TEKNOLOGI TERBARU SEPEDA MOTOR"

SAS MATA PELAJARAN PILIHAN "TEKNOLOGI TERBARU SEPEDA MOTOR"

11th Grade - University

10 Qs

Carpentry

Carpentry

University

10 Qs

Intro To CJ Chapter 1

Intro To CJ Chapter 1

12th Grade - University

10 Qs

Konstitusional dan UUD 1945

Konstitusional dan UUD 1945

University

10 Qs

Primeiro Quizz

Primeiro Quizz

University

7 Qs

Dragon ball quiz

Dragon ball quiz

5th Grade - University

6 Qs

MGT 269 Chapter 6: Job Application Letter & Resume

MGT 269 Chapter 6: Job Application Letter & Resume

University

10 Qs

B4 - The if Statement

B4 - The if Statement

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

Ahmetcan türk

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many choices are possible when using a single if-else statement?

1

2

3

4

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?


int sum = 14;

if ( sum < 20 )

System.out.print("Under ");

else

{

System.out.print("Over ");

System.out.println("the limit.");

}

Under

Over

Under the limit

Over the limit

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?


int sum = 7;

if ( sum > 20 )

{

System.out.print("You win ");

}

else

{

System.out.print("You lose ");

}


System.out.println("the prize.");

You win

You lose

You win the prize.

You lose the prize.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code fragment write to the monitor?


int sum = 21;

if ( sum != 20 )

System.out.print("You win ");

else

System.out.print("You lose ");


System.out.println("the prize.");

You win

You lose

You win the prize

You lose the prize

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate (to true or false) each of the following expressions:

14 <= 14 14 < 14 -9 > -25 -25 > -9

true true true true

true false false false

true false true true

true false true false

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?