hi guys ,

i need some help with a problem i was asked:

if a house is worth $300,000 and the interest on a loan taken to buy it is 6%, i need to find a function that calculates if i pay a certain amount each week how much do i have to pay interest on this amount and how much i would have remaining to pay for the house.

So please how is a function like this constructed???

Thanks