Search Header Logo
Input, Integers and Debugging

Input, Integers and Debugging

Assessment

Presentation

Computers

9th - 10th Grade

Medium

Created by

Calum Gordon

Used 5+ times

FREE Resource

12 Slides • 26 Questions

1

Input, Integers and Debugging

Getting input from the user

media

2

media

3

media

4

Multiple Select

Question image

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

1

Get input and produce output

2

Define 'run-time error'

3

Fix run-time errors

4

Use primitive data types

5

media

6

Fill in the Blanks

Type answer...

7

media

8

media

9

Fill in the Blanks

Type answer...

10

Draw

Label this line of code with:

variable, prompt, assignment, function

11

media

12

Multiple Choice

What data type is returned by this function call?

favFood = input("What is your favourite food? ")

1

str

2

int

3

bool

4

float

13

media

14

Fill in the Blanks

media image

Type answer...

15

media

16

Multiple Choice

Question image

What is the data type of the trackLength variable?

1

float

2

string

3

integer

4

Boolean

17

Fill in the Blanks

Type answer...

18

Fill in the Blanks

Type answer...

19

Fill in the Blanks

Type answer...

20

Fill in the Blanks

Type answer...

21

Fill in the Blanks

Type answer...

22

Fill in the Blanks

Type answer...

23

media

24

Multiple Choice

What is an error that can occur while a program is executing?

1

Run-time error

2

Syntax error

3

Logic error

4

Memory error

25

Multiple Choice

Which input value would cause a run-time error?

height = int(input("Enter your height: "))

1

'165'

2

165

3

165.5

4

0165

26

Multiple Choice

Which input value would cause a run-time error?

favFood = str(input("What is your favourite food? "))

1

None of them

2

All of them

3

False

4

""

5

3.14

27

Multiple Choice

Which input value would cause a run-time error?

trackLength = float(input("Enter the track length: "))

1

True

2

100

3

"200"

4

50.0

28

media

29

Multiple Choice

Question image

What is output if the user enters these two values:

female

165

1

Gender: female Height in cm: 165

2

Gender:femaleHeight in cm:165

3

"Gender:" female "Height in cm:" 165

4

Gender: gender Height in cm: height

30

Multiple Select

Question image

Which two lines of code produce identical output?

1

print("Gender:", gender, "Height in cm:", height)

2

print("Gender: "+ gender + " Height in cm: " + str(height))

3

print("Gender:"+ gender + "Height in cm:" + str(height))

4

print('Gender:', 'gender', 'Height in cm:', 'height')

31

Fill in the Blanks

media image

Type answer...

32

Fill in the Blanks

media image

Type answer...

33

Fill in the Blanks

media image

Type answer...

34

Fill in the Blanks

media image

Type answer...

35

media

36

Multiple Select

Question image

In this lesson I have learned to ...

1

Get input and produce output

2

Define 'run-time error'

3

Fix run-time errors

4

Use primitive data types

37

Open Ended

Question image

Thinking Hard

Now you have finished this lesson, what questions do you still want answered?

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

38

Poll

Question image

How much of this lesson have you understood?

None of it

Some of it

Most of it

All of it

Input, Integers and Debugging

Getting input from the user

media

Show answer

Auto Play

Slide 1 / 38

SLIDE