Search Header Logo
1.4 Identifying and Correcting Errors

1.4 Identifying and Correcting Errors

Assessment

Presentation

Computers

9th - 12th Grade

Medium

Created by

Jocelyn L

Used 6+ times

FREE Resource

0 Slides • 15 Questions

1

Multiple Choice

Which of the following would be an example of a Logic error?

1
  1. Incorrect variable assignment

2
  1. Baking a cake that came out fine but tastes weird because you accidentally used salt instead of sugar.

3

for s in face.children:

         if (mouth.visible == True):

              app.counter=app.counter+.5

foodCounter.value//=0

4

print("Hi, how are you?"

2

Multiple Choice

Which of the following BEST describes a syntax error

1

A mistake within a program that doesn’t follow the programming language rules.

2
  1. None of the above

3
  1. An error that occurs before you run the program

4

Any mistake that occurs after the program is executed, usually resulting in the program to crash

3

Multiple Choice

You are following your everyday morning routine, but once you get to your first class you realize you forgot your project at home! What type of error is this analogy representing?

1

Syntax Error

2

Runtime Error

3

Overflow Error

4

Logic Error

4

Multiple Choice

Which of the following would result in an Overflow error in a 3-bit system?

1

3

2

4

3

6

4

8

5

Multiple Choice

Which of the following is an effective method to prevent errors from occurring in an algorithm?

1

Anti-virus software

2

Test cases

3

Adding an extra input

4
  1. Start a new program once an error occurs

6

Multiple Choice

Question image

Which correcting errors method is the image on the side presenting?

1

Debuggers

2

Visualizations

3

Adding an extra output

4

Hand tracing

7

Multiple Choice

What is the BEST explanation visualizations is represented by?

1

Only tables and diagrams that are used to analyze program behavior

2

Any visual representation that helps us understand program behavior

3

A procedure that is created to correct errors that occur

4
  1. Stepping through each line of code to find the errors.

8

Multiple Choice

Which of the following is the correct pro of using debuggers?

1

Cheap

2
  1. It doesn’t require many resources

3
  1. Enhance code quality

4

Easy-to-reproduce bugs

9

Multiple Choice

What could you add to fix a code that divides by zero?

1
  1. Add another procedure to make dividing by zero possible

2
  1. Add another procedure that gives you an alternative when dividing by zero occurs

3
  1. Add another procedure that double checks for dividing by zero when it occurs

4

All of the above

10

Multiple Choice

What is the purpose of defined input(s)?

1
  1. Specific values already written in a program are used as similar to an example value to see if the program is working

2
  1. The purpose of a defined input is to be put in a program to fix errors during program execution.

3
  1. Defined inputs only apply after an error is encountered, and then it inserts itself automatically into the program to fix the error.

4
  1. Defined inputs are test cases that only apply to logic errors

11

Multiple Choice

Why is it important to test with defined inputs?

1
  1. Set an example for the program to follow

2

To find errors

3
  1. Help visualize how the program works

4

All of the above

12

Multiple Choice

A program is designed to print a greeting message to users based on the time of day. However, it prints the same message regardless of the time. This issue is most likely due to a:

1
  1. Runtime Error

2
  1. Overflow Error

3
  1. Logic Error

4

Syntax Error

13

Multiple Choice

 Which of the following is an example of a syntax error?

1
  1. Print("string")

2
  1. print(“@”)

3
  1. print("string")

4
  1. string = "hello!"

print(string)

14

Multiple Choice

How is visualization different from hand tracing?

1
  1. They are the same

2
  1. Visualization corrects errors while hand tracing identifies errors

3
  1. Visualization is a visual representation of code while hand tracing is manually going through each line of code to better understand.

4
  1. Visualization is visuals of code that are used to understand code better, while hand tracing is a specific type of graph used to correct errors

15

Multiple Choice

What distinguishes a runtime error from a syntax error?

1
  1. Occurs during execution, not compilation

2
  1. Is caused by incorrect data types, not code

3
  1. Occurs during compilation, not execution

4
  1. Is related to program logic, not syntax

Which of the following would be an example of a Logic error?

1
  1. Incorrect variable assignment

2
  1. Baking a cake that came out fine but tastes weird because you accidentally used salt instead of sugar.

3

for s in face.children:

         if (mouth.visible == True):

              app.counter=app.counter+.5

foodCounter.value//=0

4

print("Hi, how are you?"

Show answer

Auto Play

Slide 1 / 15

MULTIPLE CHOICE