CSE 101 PRACTICE: ERRORS AND DEBUGGING QUESTIONS AND
VERIFIED ANSWERS
Correct 14
Incorrect 00
Your answers
1 of 14
Term
Suppose you have written a program containing no typos, but it
crashes when executed. What kind of error is your program exhibiting?
Question 2 options:
a syntax error
a semantic error
a run-time error
an interpreter error
a compiler error
Give this one a try later!
Python reports a syntax error. a run-time error
,The Python interpreter. The program will crash.
, Don't know?
2 of 14
Definition
This code contains a syntax error.
Give this one a try later!
What does Python do if you type 3 + 5 , but you meant to type 3 + 4 5 ?
Question 7 options:
Python reports a run-time error.
Python reports a logic/semantic error.
Python executes the code as given.
Python reports a syntax error.
Python performs a calculation.
When a line of code containing a logical error is reached, ________ _.
Question 11 options:
the Python interpreter terminates the program.
the Python interpreter typically skips the line and doesn't execute it.
nothing obvious happens, typically.
the computer prints an error message.
We wish to compute the average of the values stored in variables exam1, exam2 and
exam3 and store the result in a variable named average. The following line of code
is provided to compute the average:
total = exam1+exam2+exam
Which of the statements below is true?
Question 13 options:
The code is correct as written.
VERIFIED ANSWERS
Correct 14
Incorrect 00
Your answers
1 of 14
Term
Suppose you have written a program containing no typos, but it
crashes when executed. What kind of error is your program exhibiting?
Question 2 options:
a syntax error
a semantic error
a run-time error
an interpreter error
a compiler error
Give this one a try later!
Python reports a syntax error. a run-time error
,The Python interpreter. The program will crash.
, Don't know?
2 of 14
Definition
This code contains a syntax error.
Give this one a try later!
What does Python do if you type 3 + 5 , but you meant to type 3 + 4 5 ?
Question 7 options:
Python reports a run-time error.
Python reports a logic/semantic error.
Python executes the code as given.
Python reports a syntax error.
Python performs a calculation.
When a line of code containing a logical error is reached, ________ _.
Question 11 options:
the Python interpreter terminates the program.
the Python interpreter typically skips the line and doesn't execute it.
nothing obvious happens, typically.
the computer prints an error message.
We wish to compute the average of the values stored in variables exam1, exam2 and
exam3 and store the result in a variable named average. The following line of code
is provided to compute the average:
total = exam1+exam2+exam
Which of the statements below is true?
Question 13 options:
The code is correct as written.