```
import math
import sys

def calculateValues(loanAmt, numYears):
    for monthlyRate in range (4, 9):
        monthlyRate = monthlyRate / 100
        monthlyPayment = loanAmt * monthlyRate / (1 - math.pow(1 / (1 + monthlyRate), numYears * 12))
        totalPayment = monthlyPayment * numYears * 12
        return monthlyRate, monthlyPayment, totalPayment

def printPayments(monthlyRate, monthlyPayment, totalPayment, loanAmt, numYears):
    print("Rate   Monthly Payment  Total Payment")
    for monthlyRate in range (4, 9):
        calculateValues(loanAmt, numYears)
        print("{0}%     ${1:0.2f}         ${2:0.2f}".format( monthlyRate, monthlyPayment, totalPayment))

def repeat():
    question = str(input("Would you like to create a new table? (Enter y for yes): "))
    if (question == "y"):
        main()
    else:
        sys.exit()

def getPositiveFloat():
    loanAmt = int(input("Enter the amount of the loan: "))
    numYears = int(input("Enter the number of years: "))
    if (loanAmt < 0) or (numYears < 0):
        print("Please enter a positive number for both questions")
        main()
    return loanAmt, numYears

def main():
    loanAmt, numYears = getPositiveFloat()
    monthlyRate, monthlyPayment, totalPayment = calculateValues(loanAmt, numYears)
    printPayments(monthlyRate, monthlyPayment, totalPayment, loanAmt, numYears)
    repeat()

main()

```

When this program runs, the monthlyRate variable (defined in printPayments) iterates, but the values calculated in calculateValues don't iterate. I've figured out that I need to give monthlyRate to calculateValues as a parameter, but I'm not sure how to do that without everything breaking.