wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Nested Conditionals

Total questions: 14

Worksheet time: 7mins

Name
Class
Date
1.

What is the main purpose of nested conditions in programming?

a)

To reduce execution time

b)

To increase memory usage

c)

To evaluate complex sets of conditions

d)

To simplify code

2.

Which programming language is mentioned in relation to nested conditions?

a)

Python

b)

JavaScript

c)

C++

d)

Java

3.

What is a common application of nested conditions?

a)

Storing data

b)

Displaying images

c)

Evaluating multiple dependent conditions

d)

Sorting data

4.

What does the pseudocode for displaying a student's grade use?

a)

Switch statements

b)

Nested conditions

c)

Loops

d)

Functions

5.

In the context of ticket fare programs, what is evaluated using nested conditions?

a)

Input scores

b)

Delivery options

c)

Weather conditions

d)

User preferences

6.

What should the program do if the fan is off and the temperature exceeds 30 degrees Celsius?

a)

Switch on the fan

b)

Display that the fan is already stopped

c)

Display that the fan is already running

d)

Switch off the fan

7.

What is the output if the fan is on and the temperature is less than 30 degrees Celsius?

a)

Display that the fan is already stopped

b)

Display that the fan is already running

c)

Switch off the fan

d)

Switch on the fan

8.

What is the first step in the restaurant ordering system challenge?

a)

Check dietary restrictions

b)

Check ingredient availability

c)

Place the order

d)

Suggest alternative dishes

9.

What is the output if dish B is not available in the restaurant ordering system?

a)

Confirm the order

b)

Place the order for dish B

c)

Suggest alternative dishes

d)

Apologize for unavailability

10.

What is the purpose of the 'Greatest among three numbers' example?

a)

To display outputs

b)

To calculate averages

c)

To show how to use nested conditions

d)

To demonstrate sorting

11.

What is a key feature of nested IF statements?

a)

They cannot be nested

b)

They are only used in JavaScript

c)

They allow for the evaluation of multiple conditions

d)

They can only evaluate one condition

12.

In the context of planning a trip, what can nested conditions help assess?

a)

Weather and budget

b)

Only transportation options

c)

Only weather

d)

Only budget

13.

What is the output if the fan is on and the temperature exceeds 30 degrees Celsius?

a)

Switch off the fan

b)

Display that the fan is already running

c)

Display that the fan is already stopped

d)

Switch on the fan

14.

What is the main focus of the learning objectives in this sprint?

a)

Understanding loops

b)

Understanding nested conditions

c)

Understanding lists

d)

Understanding functions