Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

13. what is one way to ensure testing is thorough? * a. create expected…

Question

  1. what is one way to ensure testing is thorough? *

a. create expected results prior to testing.
b. create a diagram of the programs processing.
c. execute the code to ensure it runs.
d. add temporary display statements to see intermediate results in the program.

  1. what type of error breaks the rules of the programming language, like a * 1 point

grammatical error?
a. logic error
b. overflow error
c. runtime error
d. syntax error

  1. if your program executes without errors, but the results are incorrect, * 1 point

what type of error do you likely have?
a. logic error
b. round - off error
c. runtime error
d. syntax error

Explanation:

Brief Explanations
  • Question 13: Creating expected results before testing allows for a clear comparison during testing, ensuring thoroughness.
  • Question 14: A syntax error violates the programming language's rules (like grammar), while a logic error is in the program's logic, an overflow error is due to exceeding capacity, and a runtime error occurs during execution.
  • Question 15: A logic error means the program runs (no syntax or runtime errors) but gives incorrect results.

Answer:

  1. A. Create expected results prior to testing.
  2. D. Syntax error
  3. A. Logic error