Question: Help with Python functions! I need to recreate the following code using functions for the calculations. In Python please! For this assignment, take the refresher

Help with Python functions! I need to recreate the following code using functions for the calculations. In Python please!

For this assignment, take the refresher project that you completed and create it over using functions for the calculations.

Here's the original code:

purchase_price = float(input("Enter the purchase price: ")) down_payment = float(input("Enter the down payment: "))

print(" Month Number\tTotal Balance\tInterest\tPrincipal\tPayment\t\tBalance") print("="*100)

balance = purchase_price - down_payment month_number = 1 payment = 0.05 * balance

while(balance > 0): total_balance = balance interest = (total_balance * 0.12)/12 principal = payment - interest balance = total_balance - payment print("%10.0f\t%10.2f\t%10.2f\t%10.2f\t%10.2f\t%10.2f5 "%(month_number, total_balance, interest, principal, payment, balance)) month_number = month_number + 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!