1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Which of the following is NOT a type of coding error discussed in the lecture?
Memory assignment error
What type of error prevents code from running at all?
Syntax error
Which error type occurs during execution, often called an “exception”?
Run-time error
Which error allows the program to run but gives incorrect results?
Logic error
What Python structure is used to handle run-time errors gracefully?
try–except
What keyword begins a block of code you want to test for exceptions?
try
What is an example of a run-time error?
Dividing by zero
Which of the following is NOT a common exception type listed in the lecture?
OverflowWarning
What is a "bug" in programming?
A problem or defect in a program
What does the acronym DRIFT stand for in debugging?
Discover, Reproduce, Isolate, Fix, Test
What is the purpose of the “isolate” step in DRIFT?
To find the exact line or area where the bug occurs
What tool lets you pause code at specific points to inspect variables?
Breakpoint
What debugger action executes the next line but does NOT enter a function call?
Step-over
What debugger action executes the next line and goes inside any function call?
Step-into
What does the “Variable Explorer” in a debugger show?
Current variables and their stored values
What is “rubber duck debugging”?
Explaining your code line-by-line to find logic mistakes
What is the purpose of the assert statement?
To perform sanity checks during debugging
What happens if an assert condition evaluates to False?
An AssertionError is raised and the program stops
What should you do with assert statements in final code?
Comment them out or remove them
What is the main idea of debugging according to the lecture?
Use a systematic process to find, isolate, and fix errors