Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help with the code
#1
Hi guys, my code should do this:

I have an account of 10000$ and every month I take interest of 0.5% and also I substract 500$ every month
I need for my program to stop when the account reaches 0.
And also all the years until depletion to be listed.

PS: I am a total beginner:)
Please se my code below which is not displaying an output.Please advise.
account = 10000
month = account/0.5-500
year = 12*month

for i in range(account):
    if account == account/0.5-500:
        if account == 0:
            break
        else:
            print(year)
Reply


Messages In This Thread
Please help with the code - by zarnav - Feb-12-2017, 02:15 PM
RE: Please help with the code - by wavic - Feb-12-2017, 02:17 PM
RE: Please help with the code - by zarnav - Feb-12-2017, 02:20 PM
RE: Please help with the code - by wavic - Feb-12-2017, 02:37 PM
RE: Please help with the code - by zarnav - Feb-12-2017, 04:32 PM
RE: Please help with the code - by ichabod801 - Feb-12-2017, 07:11 PM
RE: Please help with the code - by sparkz_alot - Feb-13-2017, 03:09 PM
RE: Please help with the code - by wavic - Feb-13-2017, 03:45 PM

Forum Jump:

User Panel Messages

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