[Tutor] age program

Alex Hall mehgcap at gmail.com
Mon Nov 29 16:59:08 CET 2010


On 11/29/10, Andre Jeyarajan <andrejeyarajan at rogers.com> wrote:
> Write a short program that will perform the following:It will ask the user
> for his age,it will then present the user with a menu, with 4 choices:Tell
> the user whether his age is an even or an odd number
> Tell the user his age squared
> Tell the user how many years until he’s 100 years old, or tell him that he’s
> alerady over 100!  If the user is exactly 100 years old, congratulate him
> for being a centurion.
> I have tried everything i can. Can you please explain it to me?
Explain which part exactly? That is, what have you gotten to work so
far? If you have not gotten anything yet, I recommend looking up the
input() and raw_input() methods for age and menu. After that it is
just a couple math operations and some if statements inside a while
loop.


-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap at gmail.com; http://www.facebook.com/mehgcap


More information about the Tutor mailing list