Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
retirement counter help
#1
So, I’m old. I tried to learn just enough Python to make a retirement count down and a retirement money count up. Part of my retirement is that in the last 5 years they let you retire, hire you back and pay you your retirement pay plus bonuses and they also pay you your regular pay. The retirement pay has to go into a special account that cannot be accessed. That account is called the DROP account. When you leave you get the drop account.

I want my program to do the following:
  1. To do a countdown of how many days I have left. Start date 10/1/17 End date 10/01/22
  2. Have a count up of how much money is in my DROP account.
  3. Add to my drop account every minute. The 5 year estimate of my drop account is $540,000. Broken down that will be .20547945 cents every minute of the 5 years. Or 12.3287671 dollars every hour of the 5 years. I would like it to calculate by the minute.
  4. I would also like the date and time to be displayed.
  5. I want the background to be blue and the font to be larger than standard.
  6. I am flirting with a cha-ching sound every hour, but I am not set on that.
I would like to run this on a PI zero, hooked up to a monitor always running in my office.

Questions I have.
  1. Do I need wifi for this program to run?
  2. Can someone get it to add to my drop account every minute? (add be .20547945 cents every minute, but only display 2 spaces after the .)
  3. Is there a date and time module I can just add for the date and time?

This is all I have so far. (It only runs once when you open it) while it does work, it does not do what I want it to. Currently, it only calculates 1 time when it is opened.

import time
from datetime import date
start_money = round(0, 2)
per_day = 296
starting_date = date(2017, 10, 1)
today = date.today()

days_since_start = (today - starting_date)


current_money = start_money + per_day * days_since_start.days

print ("Steve  has a total of $",current_money ," in his drop account", sep='')
print("")
retirement_date = date(2022, 10, 1)

days_until = retirement_date - today

print ("You have", days_until.days, "days until retirement")
print("")
print("")
print("")
Reply


Forum Jump:

User Panel Messages

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