From 360c7fb615074025109723eb85af39b7fe5ab209 Mon Sep 17 00:00:00 2001 From: thanmaisai Date: Tue, 4 Oct 2022 23:20:29 +0530 Subject: [PATCH 1/3] added a CI calculator. --- README.md | 3 +++ calculate_CompoundIntrest.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 calculate_CompoundIntrest.py diff --git a/README.md b/README.md index 3683b133..1b9d149d 100644 --- a/README.md +++ b/README.md @@ -51,3 +51,6 @@ GeneratePassword.py ## Script 10 - Simple TCP Chat Server server.py - Creates a local server on your LAN for receiving and sending messages! + +## Script 11 - compound intrest calculator +calculate compound intrest diff --git a/calculate_CompoundIntrest.py b/calculate_CompoundIntrest.py new file mode 100644 index 00000000..164c80a8 --- /dev/null +++ b/calculate_CompoundIntrest.py @@ -0,0 +1,23 @@ +print('How many years will you be saving?') +years = int(input('Enter years: ')) + +print('How much money is currently in your account?') +principal = float(input('Enter current amount in account: ')) + +print ('How much money do you plan on investin monthly?') +monthly_invest = float(input('Enter amount: ')) + +print ('What do you estimate will be the yearly interest of this investment?') +interest = float(input ('Enter interest in decimal numbers (10% = 0.1): ')) +print(' ' ) + +monthly_invest = monthly_invest * 12 +final_amount = 0 + +for i in range(0, years): + if final_amount == 0: + final_amount = principal + +final_amount = (final_amount + monthly_invest) * (1 + interest) + +print("This is how much money you would have in your account after{} years: ".format (years) + str(final_amount)) \ No newline at end of file From 90b6685be32ff1502de603e395398a86660e9975 Mon Sep 17 00:00:00 2001 From: thanmaisai <91474486+thanmaisai@users.noreply.github.com> Date: Tue, 4 Oct 2022 23:26:45 +0530 Subject: [PATCH 2/3] resolving conflit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b9d149d..59f10148 100644 --- a/README.md +++ b/README.md @@ -52,5 +52,5 @@ GeneratePassword.py ## Script 10 - Simple TCP Chat Server server.py - Creates a local server on your LAN for receiving and sending messages! -## Script 11 - compound intrest calculator +## Script 13 - compound intrest calculator calculate compound intrest From 158a6ee2dce16dcd5c16a028cb7232c63c91ee59 Mon Sep 17 00:00:00 2001 From: thanmaisai Date: Tue, 4 Oct 2022 23:33:28 +0530 Subject: [PATCH 3/3] fixed typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 59f10148..7841f13b 100644 --- a/README.md +++ b/README.md @@ -52,5 +52,5 @@ GeneratePassword.py ## Script 10 - Simple TCP Chat Server server.py - Creates a local server on your LAN for receiving and sending messages! -## Script 13 - compound intrest calculator -calculate compound intrest +## Script 13 - compound interest calculator +calculate compound interest