Python Forum
Basic Programming Help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic Programming Help
#1
Hi everyone,

I'm new to the site and just started taking a beginners Python course. I was hoping to see if I could receive some assistance with an assignment I've been working on.

This is the problem I'm working on:

(Financial application: compound value) Suppose you save $100 each month into a savings account with an annual interest rate of 5%. Therefore, the monthly interest rate is After the first month, the value in the account becomes 100 * (1 + 0.00417) = 100.417 After the second month, the value in the account becomes (100 + 100.417) * (1 + 0.00417) = 201.252 After the third month, the value in the account becomes (100 + 201.252) * (1 + 0.00417) = 302.507 and so on. Write a program that prompts the user to enter a monthly saving amount and displays the account value after the sixth month. Here is a sample run of the program:

Enter the monthly saving amount: (WHATEVER NUMBER)

After the sixth month, the account value is (WHATEVER NUMBER)




This is the code I've used so far but I know it's not right. Just confused on how I should word the code so that it will just display the value after the 6th month!It displays the savings after the first month I just don't know how to word it to display the savings amount after 6th months in the savings account.

no1=eval(input("Enter the monthly saving amount:"))

print((no1)*(1+0.00417))
no2=(no1)*((1+0.00417)**6)

print((no1+no2)*(1+0.00417))
no3=(no1+no2)*(1+0.00417)

print=((no1+no3)*(1+0.00417))
no4=(no1+no3)*(1+0.00417)

print=((no1+no4)*(1+0.00417))
no5=(no1+no4)*(1+0.00417)

print=((no1+no5)*(1+0.00417))
no6=(no1+no5)*(1+0.00417)
Reply


Messages In This Thread
Basic Programming Help - by Travisbulls34 - Sep-11-2018, 02:30 PM
RE: Basic Programming Help - by caampos22 - Sep-11-2018, 04:20 PM
RE: Basic Programming Help - by ichabod801 - Sep-11-2018, 04:57 PM
RE: Basic Programming Help - by gruntfutuk - Sep-11-2018, 06:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Verilog HDL Programming to Python Programming? noobcoder 1 3,099 Jul-18-2019, 09:28 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020