Remove .md and image files and move python files into main chapter folders
This commit is contained in:
parent
5978779a9a
commit
67806dab6a
159 changed files with 0 additions and 4562 deletions
17
thinkcspy/Chapter-2-Exercises/problem7.py
Normal file
17
thinkcspy/Chapter-2-Exercises/problem7.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Runestone.Academy thinkcspy course
|
||||
# Chapter 2
|
||||
# Problem 7
|
||||
|
||||
P = 10000
|
||||
n = 12
|
||||
r = 0.08
|
||||
n = 12
|
||||
|
||||
# Noticed that they gave separate variables to the inputs problem 3 and
|
||||
# the converted ints so decided to do the same here.
|
||||
t_string = input('For how many years will your principal be earning interest?')
|
||||
t = int(t_string)
|
||||
|
||||
A = P*(1+r/n)**(n*t)
|
||||
|
||||
print('The final amount after you will earn after', t, 'years is', A)
|
||||
Loading…
Reference in a new issue