[ create a new paste ] login | about

Link: http://codepad.org/Y8tRwBpm    [ raw code | output | fork ]

Python, pasted on Dec 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
coin_cost = 0.0
bill_cost = 0.0
i = 0.02
year = 0
while year < 90:
 bill_cost += 0.027*1e9
 year += 4.5
 bill_cost*=(1+i)**4.5

year = 0
while year < 90:
 coin_cost += 0.15*1e9
 year += 30
 coin_cost*=(1+i)**30

print bill_cost-coin_cost


Output:
1
-89885158.5712


Create a new paste based on this one


Comments: