Skip to content

Commit f9957e0

Browse files
authored
Merge pull request #33 from OscarRufino/Oscar-Romero
Agragado nuevo archivo
2 parents ad55bbc + 1efe06d commit f9957e0

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Oscar-Romero.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Tasa de crecimiento de tu cuenta
2+
3+
# Cada año la cantidad de dinero en la cuenta crece 20%
4+
# Calcular cuantos años se tardará tu ingreso inicial en crecer a una cantidad meta
5+
6+
def depositProfit(deposit, rate, threshold):
7+
count = 0
8+
growthRate = rate * 0.01
9+
while (deposit < threshold):
10+
interest = deposit * growthRate
11+
print('currently in the account ', deposit)
12+
deposit += interest
13+
count += 1
14+
return count
15+
16+
prueba = depositProfit(300, 4, 500)
17+
print(prueba)

0 commit comments

Comments
 (0)