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 Blanks

media image

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

Type answer...

12

media

13

Fill in the Blanks

media image

Type the missing line of code ...

Type answer...

14

media

15

Fill in the Blanks

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

Type answer...

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 Blanks

media image

Type the name of a constant value ...

Type answer...

26

Fill in the Blanks

media image

Type the name of a string constant value ...

Type answer...

27

Fill in the Blanks

media image

Type the name of a float constant value ...

Type answer...

28

Fill in the Blanks

media image

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

Type answer...

29

Fill in the Blanks

media image

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

Type answer...

30

Fill in the Blanks

media image

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

Type answer...

31

Fill in the Blanks

media image

Type the name of a Python keyword ...

Type answer...

32

Fill in the Blanks

media image

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

Type answer...

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

pattern-tertiary
If, Elif, Else, Readability

Good practices for selection statements

media

Show answer

Auto Play

Slide 1 / 36

SLIDE