I'm just learning python and am trying to make a program that calculates loan rates. I keep getting an unsupported operand type for \*: 'function' and 'int.' with references to lines 14 and 8. I'm not sure what I'm doing wrong. Here is the code:

```
from sys import argv

def payment(amt, rate, yrs) :
    def p(yrs) :
        return 12 * yrs
    def r(rate) :
        return rate / 100 / 12
    return (r * amt) / (1 - ((1 + r) ** (-p)))

if __name__ == "__main__" :
    amt = int(argv[1])
    rate = float(argv[2])
    yrs = int(argv[3])
    print("$%.2f" % payment(amt, rate, yrs))

```