[Tutor] Question
Sean 'Shaleh' Perry
shalehperry@attbi.com
Sat Feb 8 12:24:02 2003
On Saturday 01 February 2003 14:32, Ben Patel wrote:
> Hello:
>
> I would like to write a program to calculate age of a person based on t=
he
> birth date entered (in any format).
>
> Any help would be appreciated.
>
how would you (a person) accomplish this? You ask for the their birth da=
te=20
and subtract it from the current year. So, what do you need?
their birth date (start simple and just ask for a year, then get fancy)
the current date
a way to ask for the first item and display the answer
The python online docs (or the ones that came with your local install if =
any)=20
should be able to answer these.
This may not sound like a direct answer. Rather the point is to get you =
to=20
think about a problem in this manner so you can solve even bigger problem=
s=20
later. Part of programming is being able to consider the problem and bre=
ak=20
it into smaller, easier to solve pieces.