8.4.5 Selection & Elif homework

8.4.5 Selection & Elif homework

8th Grade

6 Qs

quiz-placeholder

Similar activities

User Input in Python

User Input in Python

6th - 10th Grade

11 Qs

Python - Printing, Variables and Syntax

Python - Printing, Variables and Syntax

8th Grade

10 Qs

If statements

If statements

6th - 8th Grade

7 Qs

Spot the Bug! (JS1)

Spot the Bug! (JS1)

6th - 10th Grade

8 Qs

BrainPOP Loops

BrainPOP Loops

8th Grade

10 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Farmbot lesson 4

Farmbot lesson 4

6th - 8th Grade

11 Qs

Python

Python

8th Grade

10 Qs

8.4.5 Selection & Elif homework

8.4.5 Selection & Elif homework

Assessment

Quiz

Computers

8th Grade

Hard

Created by

J Platten

Used 16+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is selection programming?

A condition selects which code to repeat.

A condition chooses/decides which lines of code to run.

Any code that selects variable assignments.

Selecting to run every single line of code.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If we want multiple selections (more than two) in our Python program which is correct code to use?

if

if

if

else

if

else

else

else

if

elif

elif

else

if

else if

else if

else if

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with this code?

Missing equals sign

No indentation (white space)

No line spaces between the code

Nothing this code is fine.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with this code?

The code has been indented (white space)

There is a missing equals sign if age == 10

There is a missing equals sign on line one age == 10

the else statement is not complete else age ! = 10:

5.

MULTIPLE SELECT QUESTION

45 sec • 2 pts

Media Image

What is wrong with this code? (Select two)

Missing equal sign

Missing comparison operator

Should be grade == 75

Should be elif grade < 80

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is wrong with this code?

The else should be an elif

The sequence is wrong the elif should be moved before the else

Missing an equal sign

if x >=5

There is nothing wrong with this code.