IF-Elif-Else

IF-Elif-Else

Assessment

Interactive Video

Computers

7th Grade

Medium

Created by

John Streety

Used 1+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an IF-THEN statement?

To create a loop

To perform mathematical calculations

To store data

To make decisions based on conditions

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the game example, what happens if the input is 'yes'?

The game pauses

The game continues

The game restarts

The game quits

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'else' statement do in the game example?

It repeats the question

It provides an alternative action if the condition is not met

It changes the game settings

It ends the game

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we convert the temperature input from a string to an integer?

To save it in a file

To make it easier to read

To display it on the screen

To perform mathematical comparisons

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the while loop in the temperature example?

To display the temperature once

To allow continuous input of temperature values

To convert temperature to Fahrenheit

To stop the program after one input