Search Header Logo

Lab5_Quiz_section2

Authored by bme programming

Computers

University

Lab5_Quiz_section2
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

What does an if statement check?

If a variable is declared

If a condition is true

If a loop is working

If a function is called

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used for multiple conditions in if-else blocks?

elif

switch

else if

elseif

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will if (true||false) return?

Error

True

False

Null

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does nested if mean?

One if inside another

An infinite loop

A standalone if block

A function inside a loop

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can an if statement exist without an else?

Yes

No

Only in loop

Only in functions

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a switch case?

For looping through arrays

For choosing between multiple options

For defining variables

For declaring functions

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add a default block in a switch statement?

case default:

default:

else:

default case:

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