
1.4 Identifying and Correcting Errors
Presentation
•
Computers
•
9th - 12th Grade
•
Medium
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?
Incorrect variable assignment
Baking a cake that came out fine but tastes weird because you accidentally used salt instead of sugar.
for s in face.children:
if (mouth.visible == True):
app.counter=app.counter+.5
foodCounter.value//=0
print("Hi, how are you?"
2
Multiple Choice
Which of the following BEST describes a syntax error
A mistake within a program that doesn’t follow the programming language rules.
None of the above
An error that occurs before you run the program
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?
Syntax Error
Runtime Error
Overflow Error
Logic Error
4
Multiple Choice
Which of the following would result in an Overflow error in a 3-bit system?
3
4
6
8
5
Multiple Choice
Which of the following is an effective method to prevent errors from occurring in an algorithm?
Anti-virus software
Test cases
Adding an extra input
Start a new program once an error occurs
6
Multiple Choice
Which correcting errors method is the image on the side presenting?
Debuggers
Visualizations
Adding an extra output
Hand tracing
7
Multiple Choice
What is the BEST explanation visualizations is represented by?
Only tables and diagrams that are used to analyze program behavior
Any visual representation that helps us understand program behavior
A procedure that is created to correct errors that occur
Stepping through each line of code to find the errors.
8
Multiple Choice
Which of the following is the correct pro of using debuggers?
Cheap
It doesn’t require many resources
Enhance code quality
Easy-to-reproduce bugs
9
Multiple Choice
What could you add to fix a code that divides by zero?
Add another procedure to make dividing by zero possible
Add another procedure that gives you an alternative when dividing by zero occurs
Add another procedure that double checks for dividing by zero when it occurs
All of the above
10
Multiple Choice
What is the purpose of defined input(s)?
Specific values already written in a program are used as similar to an example value to see if the program is working
The purpose of a defined input is to be put in a program to fix errors during program execution.
Defined inputs only apply after an error is encountered, and then it inserts itself automatically into the program to fix the error.
Defined inputs are test cases that only apply to logic errors
11
Multiple Choice
Why is it important to test with defined inputs?
Set an example for the program to follow
To find errors
Help visualize how the program works
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:
Runtime Error
Overflow Error
Logic Error
Syntax Error
13
Multiple Choice
Which of the following is an example of a syntax error?
Print("string")
print(“@”)
print("string")
string = "hello!"
print(string)
14
Multiple Choice
How is visualization different from hand tracing?
They are the same
Visualization corrects errors while hand tracing identifies errors
Visualization is a visual representation of code while hand tracing is manually going through each line of code to better understand.
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?
Occurs during execution, not compilation
Is caused by incorrect data types, not code
Occurs during compilation, not execution
Is related to program logic, not syntax
Which of the following would be an example of a Logic error?
Incorrect variable assignment
Baking a cake that came out fine but tastes weird because you accidentally used salt instead of sugar.
for s in face.children:
if (mouth.visible == True):
app.counter=app.counter+.5
foodCounter.value//=0
print("Hi, how are you?"
Show answer
Auto Play
Slide 1 / 15
MULTIPLE CHOICE
Similar Resources on Wayground
12 questions
Dividing Polynomials--Long Division
Presentation
•
9th - 12th Grade
11 questions
04.01 Databases
Presentation
•
9th - 12th Grade
13 questions
Warstwy protokołów TCP/IP
Presentation
•
9th - 12th Grade
11 questions
Python 1.
Presentation
•
9th - 12th Grade
11 questions
Mastering Control Flow Statements in Python
Presentation
•
9th - 12th Grade
13 questions
Types of Chemical Reactions
Presentation
•
9th - 12th Grade
11 questions
Long & Short Term Goals
Presentation
•
9th - 12th Grade
11 questions
Origin of Life - Scientific Contributions
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade