Debugging Exercises

  1. Write a Python script that calculates the balance after the first payment of a loan (given the number of years, initial balance and the APR).
  2. Discuss with your neighbor good strategies to test / debug your code.
  3. Discuss with your neighbor an example of each of the following errors:
    • ParseError
    • TypeError
    • NameError
    • ValueError
  4. Match each error above with the correct type of error below:
    • Syntax error
    • Runtime error
    • Logic error