Search Header Logo
If, Elif, Else, Readability

If, Elif, Else, Readability

Assessment

Presentation

Computers

9th - 10th Grade

Medium

Created by

Calum Gordon

Used 16+ times

FREE Resource

14 Slides • 22 Questions

1

If, Elif, Else, Readability

Good practices for selection statements

media

2

media

3

media

4

Multiple Select

Question image

In this lesson I am going to learn to ... ?

1

Use relational operators

2

Use if ... elif ... else in code

3

Identify readability features in code

5

media

6

Multiple Choice

Question image

This is an example of ... ?

1

Selection

2

Repetition

3

Sequence

4

Iteration

7

Open Ended

Remind yourself of the relational operator symbols for:

greater than / less than

greater than or eqial to / less than or equal to

is equal to / is not equal to

8

media

9

media

10

Multiple Choice

Question image

What is output for an input of 18?

1

"You cannot drive"

2

"You could drive a moped"

3

"You could drive a car"

4

No output

11

Fill in the Blank

Question image

What is input for an output of "You could drive a moped"?

12

media

13

Fill in the Blank

Question image

Type the missing line of code ...

14

media

15

Fill in the Blank

A value that you don't want to be changed during program execution is called a _________

16

media

17

Multiple Choice

Question image

Programmers call the use of the 0.2 value here a ________ number.

1

magic

2

random

3

unknown

4

fixed

18

media

19

media

20

Multiple Select

Choose all the rules for how constant values should be identified ...

1

written in UPPER CASE

2

words separated by _

3

meaningful/descriptive name

4

preceded by keyword const

5

name shorter than 10 characters

21

Open Ended

Create your own constant identifiers for:

the mathematical value of pi (3.14)

the VAT rate of 20%

the speed of light

Hubble's constant

22

media

23

media

24

Multiple Select

Choose all the ways in which you can make your code more readable ...

1

Using descriptive identifiers

2

Adding comments

3

Use of whitespace

4

Structuring your program code

5

Making it as long as possible

25

Fill in the Blank

Question image

Type the name of a constant value ...

26

Fill in the Blank

Question image

Type the name of a string constant value ...

27

Fill in the Blank

Question image

Type the name of a float constant value ...

28

Fill in the Blank

Question image

Type a line number that uses a string method ...

29

Fill in the Blank

Question image

Type a line number that uses a relational operator ...

30

Fill in the Blank

Question image

Type a line number that uses an arithmetic operator ...

31

Fill in the Blank

Question image

Type the name of a Python keyword ...

32

Fill in the Blank

Question image

Type the name of a standard Python function (without the parentheses) ...

33

media

34

Multiple Select

Question image

In this lesson I have learned to ...

1

Use relational operators

2

Use if ... elif ... else in code

3

Identify readability features in code

35

Open Ended

Question image

Thinking Hard

Prioritise the knowledge you have gained in this lesson from most to least important.

(press Shift+Enter to take a new line ...)

36

Poll

Question image

How much of this lesson have you understood?

None of it

Some of it

Most of it

All of it

If, Elif, Else, Readability

Good practices for selection statements

media

Show answer

Auto Play

Slide 1 / 36

SLIDE