Python Forum

Full Version: Business formulas more help needed!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, I need to get each of these formulas with the numbers that are listed below and I believe I have figured out the first one, but, I'm not 100% sure where to go from here or with the other formulas. He helped me some with the first but now I'm stuck. Any help is welcomed!

#  Future Value of Annuity

p = 1000
r = 2 / 100
n = 5


future_value  = p*((1+(0.01*r)) ** n)
print(round(future_value,2))



#$5,204.04



#FV of Annuity -Continuous Compounding
CF = 1000
r = 6/100/12
t = 12
import math
print(math.e)
print (math.e ** 2)
print (math.exp(2))







#Annuity (FV)-Solve for n
FV= 19600
r = 5/100
p = 1000
print (math.log(math.exp(3)))



#Annuity Payment
PV = 100000
r = 5/100
n = 10


print (p)
Help us to help you.  Are you getting errors?  Or is your output not what you expected?
In the second case, what output do you currently get, and what are you expecting to get?
So, this is the code that I have gotten together for each of the formulas. But i'm getting an error for line 5 and i'm not sure why. Any helpp?

# future value of annuity
p = 1000
r = 2/100
n = 5
FV= p ((1+r) ** n - 1/r)
print(FV)

#FV of annuity- continuous compounding
CF= 1000
r = 6/100/12
t = 12
import math
FV= CF * ((1 + (r/n)) ** (n*t))
print (FV)


#Annuity (FV)- solve for n
import math
FV= 19600
r = 5/100
p = 1000
n = math.log(1 + FV*r / p) / math.log(1+r)
print(n)


# annuity payments
PV= 100000 # how much
r = 5/100 # interest rate
n = 10 #how many years
p = r * (PV) / ((1 + r) ** n - 1)

print(p)

Whoops, in line 5 im suppose to have a * in between the p and the rest of the formula. But, I'm still not getting the correct answers
Please do not start new threads when they concern the same topic and code.

As to the problem, what is the output you are getting and what output do you expect?
(Aug-28-2017, 11:57 PM)sparkz_alot Wrote: [ -> ]Please do not start new threads when they concern the same topic and code.

sorry newbie!!

in the order of the code
5204.0401600000005
12336.416801016496
14.000708059400562
12350.45749654566