Question 2
PV = 60000 #You Borrow $60,000
r = 0.05 # Yearly Interest = 5%
n = 8 # 8 years
r = r/12 #Monthly Payment
n = n*12 #96 months
top = r* PV bottom = 1-(1+r)**-n fraction = top / bottom P=fraction print ("P = "+str(P)) print ("PV = "+str(PV)) print ("Monthly Interest = "+str(r)) print ("Number of Periods in Months = "+str(n))
Question 3
PV = 60000 #You Borrow $60,000
r = 0.05 # Yearly Interest = 5%
n = 48 r = r/12 #Monthly Payment
#96 months
P=759.59520072743
part1=PV*(1+r)**n part2=P*((((1+r)**n)-1)/r) FV=part1-part2 print(FV)
Lab 1.5 Questions 1-3
Question 1
import math from builtins import printfrom builtins import strr = 0.06 #Annual Interest RateP = 1000 #Beginning Balance of a Savings Accountt = 2 #Number of Yearsn = 1v = (P)*((1)+(r/n))**(n*t) va = (P)*((1)+(r/12))**(12*t) vb = (P)*((1)+(r/365))**(365*t) vc = (P)*((1)+(r/8760))**(8760*t) print ("Compounded Yearly: Balance After Two Year(s)= " +str(v)) print ("Compounded Monthly: Balance After Two Year(s)= " +str(va)) print ("Compounded Daily: Balance After Two Year(s)= " +str(vb)) print ("Compounded Hourly: Balance After Two Year(s)= " +str(vc)) print ("Limit = $" +str(P*math.e**(r*t)))
Question 2
import math from builtins import print P = 100r = (0.06/12) n = 2 * 12FV = (P)*((((1+r)**n)-1)/r) print("FV = $"+str(FV))
Question 3
import math from builtins import print P = 100r = 0.06/12FV = 4000 a = (1 + ((FV * r)/P)) b = math.log(a) c = 1+r d = math.log(c) print ("Number of Periods = "+ str(b/d))
No comments:
Post a Comment