Finish the function make_payment that takes the inputs payment and balance.

Have the function print the string "You still owe: x", with x being the amount that you still owe. Then return the amount you still owe. Remember to add interest to the final amount!

We went to a hotel for 5 nights. We then decided to pay half the bill. Then we decided to pay another 100 dollars. At the end of your code, make sure to print out how much we still owe. (Check the hint if you need help!)

the best i could get was:

- Code: Select all
`def hotel_cost(nights):`

return nights * 140

bill = hotel_cost(5)

def add_monthly_interest(balance):

return balance * (1 + (0.15 / 12))

def make_payment(payment, balance):

balance_ = balance - payment

return add_monthly_interest(balance_)

new_bill = make_payment(bill / 2, bill)

make_payment(100, new_bill)