Unit 1.4 Notes on Identifying and Correcting Errors

Practice Python Error Testing

Daily Video 1

  • Different types of errors:
  • A logic error is a mistake in a program that causes it to behave incorrectly or unexpectedly
  • A syntax error is a mistake in the program where the rules of programming aren’t followed
  • A run-time error is a mistake that occurs in the program during the execution of the program
  • An overflow error is an error that occurs when a computer attempts to handle a number that is outside the defined range of values

Daily Video 2

  • Find and correct errors by:
  • test cases
  • hand tracing
  • visualizations
  • debuggers
  • adding extra output statements

Daily Video 3

  • In the development process, testing uses defined inputs to ensure an program is producing the expected outcomes.
  • Use results of testing to revise program
  • Defined inputs used to test a program should demonstrate the different expected outcomes that are at or beyond the extremes (min and max) of input data
  • Program requirements are needed to define inputs for testing

Quiz

3/3