If, elif, else

If, elif, else

Assessment

Quiz

Computers

8th - 9th Grade

Medium

CCSS
6.EE.A.2B

Standards-aligned

Created by

david alex

Used 37+ times

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The if, elif, else statement is used for...

selection

iteration

indentation

printing

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol should go at the end of an if statement?

"

)

:

;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what does the == sign do in this code?

compares the value stored in the password variable with the string "secret"

assigns the string value "secret" to the password variable

prints the password

asks the user to input their password

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

what is the variable name in this code?

print

if

secret

password

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

else: is used

to give an extra condition

to provide an output when the other conditions are false

because it is required

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

If you want more than one option for your code, what do you use (after if)?
elif
else
ifif

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol do you use to make or add a comment in Python?

@

¬

;

#

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?