Python  1.0
Functions
_02d_interest Namespace Reference

Interests. More...

Functions

def compounding_interest (c, n, t)
 Calculates the compounding interest. More...
 
def continuous_compounding_interest (c, n, r)
 Calculates the continuous compounding interest. More...
 
def interest (c, n, t)
 Calculates the compounding interest and the continuous compounding interest. More...
 
def main ()
 

Detailed Description

Interests.

Author
Paulo Roma
Since
10/06/2012

Function Documentation

◆ compounding_interest()

def _02d_interest.compounding_interest (   c,
  n,
  t 
)

Calculates the compounding interest.

Parameters
cinitial capital.
nnumber of periods.
tinterest rate.
Returns
\(J(n,c,t) = c(1 + t)^{n}.\)

Referenced by interest().

◆ continuous_compounding_interest()

def _02d_interest.continuous_compounding_interest (   c,
  n,
  r 
)

Calculates the continuous compounding interest.

Parameters
cinitial capital.
nnumber of periods.
rinterest rate.
Returns
\(J(n,c,r) = ce^{rn}.\)

Referenced by interest().

◆ interest()

def _02d_interest.interest (   c,
  n,
  t 
)

Calculates the compounding interest and the continuous compounding interest.

Parameters
cinitial capital.
nnumber of periods.
tinterest rate.
Returns
a tuple: (compounding interest, continuous compounding interest).

References compounding_interest(), and continuous_compounding_interest().

Referenced by main().

◆ main()

def _02d_interest.main ( )

References _01d_dec2bin.input, and interest().