Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

quiz-placeholder

Similar activities

SQLite - Writing Queries

SQLite - Writing Queries

University

9 Qs

Sistema Operacional IOS

Sistema Operacional IOS

University

14 Qs

Conditions

Conditions

University

15 Qs

Qcm (Le tableur, les formules et adressage)

Qcm (Le tableur, les formules et adressage)

University

12 Qs

Data mining-Clustering-1

Data mining-Clustering-1

University

7 Qs

GIS Unit III

GIS Unit III

University

15 Qs

Quiz3_DivideConquer_GreedyApproach

Quiz3_DivideConquer_GreedyApproach

University

10 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Adila Nordin

Used 34+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What value is assigned to fee by the multiple if-else statement when speed is 75?

40.00

60.00

20.00

error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What value is assigned to fee by the multiple if-else statement when speed is 75?

60.00

20.00

40.00

error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output when the value of number is 20?

A

B

C

error

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output when the value of number is 10?

A

B

C

error

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What is the output when the value of number is 50?

A

B

C

error

6.

MULTIPLE SELECT QUESTION

1 min • 1 pt

boolean attendance = true;

Which of the following if statement includes a condition that evaluates to true? (can select more than 1)

if(attendance) {...}

if(attendance == "true") {...}

if(attendance == true) {...}

if(attendance != false) {...}

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Choose the correct syntax of SWITCH statement in Java below.

switch(input)

{

case constant1: //statements; break;

case constant2: //statements; break;

default: //statements;

};

switch(input)

{

case constant1: //statements; break;

case constant2: //statements; break;

default: //statements;

}

switch(input)

{

case constant1: //statements; break;

case constant2: //statements; break;

default case: //statements;

};

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?

Discover more resources for Computers