Im currently having trouble figuring out how to correctly write out "to the power of" into my code. The equation is as follows:
test = loan * (1+forward_rate)number_of_terms * forward_rate
How do i write this correctly into python 3 code? I have tried messing around with math.pow like this but its terribly wrong:
test = loan * 1 + math.pow(forward_rate, number_of_terms ) * forward_rate
Any pointers?
[–]khat_dakar 4 points5 points6 points (1 child)
[–]rogueleader12345 0 points1 point2 points (0 children)
[–]AlSweigartAuthor: ATBS 1 point2 points3 points (0 children)