I have attached the question, but finding it difficult to attach the original 'debug_lab.py' file. But I've attached as doc, I'm not sure if it will work copying it to Python.
# -*- coding: utf-8 -*-
"""
Lab: Basic Debugging Techniques
This script calls functions from a separate module, debug.
The three functions contained in that module all have bugs - some are obvious,
others are more cryptic. It is your job to test the functions here and
investigate the logic in the module to make sure things are working properly.
Hint: There is nothing to fix within this file itself for Exercise 2. However, you should set
breakpoints here and use the blue "Step into" button above to go to the function
code itself.
@author: WQU
"""
import debug
#Exercise 1
input("Welcome! The line following this one should pause before execution,\n \
if you set a breakpoint. Hit Enter to continue...")
tot = 10
for num in range(1,201):
print("Current total: %d" % tot)
print("Adding %d..." % num)
tot = num+tot
print("New total: %d" %tot)
#Exercise 2
#Function 1
input("First, we will calculate simple interest on a loan.\
\nPress Enter when ready...")
total = debug.get_simple_interest()
print("The total interest on the loan is: %.2f" % total)
#Function 2
input("Now, we will the balance for continuously compounded interest on a loan.\
\nPress Enter when ready...")
principal = 5000.0
rate = 0.03
term_yrs = 5
balance = debug.compound_interest(principal,rate,term_yrs)
print("Total balance is: %.2f" % balance)
#Function 3
input("The final calculation will give you expected loan payments for an auto loan.\
\nThe bugs here may not be easy to discover!\nPress Enter when ready...")
debug.get_car_payment()