Search Header Logo
Duck Debugging

Duck Debugging

Assessment

Presentation

Computers

10th Grade

Practice Problem

Easy

Created by

Roy Duguid

Used 3+ times

FREE Resource

25 Slides • 8 Questions

1

media

2

Homework

3

media

4

media

5

Maintain (verb)
main - tain

To keep in good condition

"A large house costs a lot to maintain"

6

media

7

Maintainability

Maintainability is the ability of a program to be easily understood, updated, and modified.
It's important to ensure that code is maintainable so that other programmers can easily read, understand, and fix it.

8

Maintainabilty

Commenting
Code reviews
consistent naming conventions
modular design
Testing
Clear documentatio
n

Copy pasting code
ignoring errors
outdated libraries
overly complex code
spaghetti code

9

Multiple Choice

We can make our code maintainable by...

1
Follow best practices for coding style, organization, and documentation.
2
Use complex algorithms for simple tasks to confuse others.
3
Ignore coding standards and write code however you like.
4
Avoid commenting on code to keep it clean and uncluttered.

10

Multiple Choice

We can add comments to our code which is ignored by python by using which symbol?

1
#
2
%%
3

*

4
//

11

Categorize

Options (12)

Commenting

Code reviews
Consistent naming conventions
Modular design

Testing

Clear documentation
Lack of documentation
Spaghetti code
Copy-pasting code
Ignoring error handling
Using outdated libraries
Overly complex algorithms

Organize these options into the right categories

Helps maintain code:
Doesn't help maintain code:

12

Coding with a duck

13

media

14

media

15

Give them a name

Meet your duck

16

Word Cloud

My ducks name is...

17

media

18

Open Ended

Question image

What is the error in this code?

(speak to your duck)

19

Open Ended

Question image

What is the error in this code?

(speak to your duck)

20

media

21

media

22

media

23

media

24

media

25

media

26

media

27

Comparison of Syntax, Runtime, and Logic Errors

Aspect

Syntax Error

Runtime Error

Logic Error

When it Occurs

Before the program runs (during parsing or compilation)

While the program is running

The program runs without crashing, but the output is incorrect or unexpected

Nature of Error

Relates to incorrect structure or grammar in the code

Occurs when valid syntax encounters issues during execution

Relates to incorrect logic or algorithm that leads to incorrect behavior or results

Can Program Run?

No, the program will not run until the syntax is corrected

Yes, the program starts running, but crashes at the point of error

Yes, the program runs to completion but produces the wrong result

Example

Missing : after an if statement

Dividing by zero (e.g., 10 / 0)

Using if a < b: when intending if a > b:


28

Multiple Choice

Question image

What type of error is this?

(Speak to your duck)

1
Logical Error
2
Runtime Error
3
Syntax Error

29

Multiple Choice

Question image

What type of error is this?

(Speak to your duck)

1
Syntax error
2
Runtime error
3
Logical error

30

media

31

Activities in Teams

32

media

33

media
media
media

Show answer

Auto Play

Slide 1 / 33

SLIDE