Detect entered value is AGE or in YEAR and tell your age in a particular year in which you asked or when you will be 100. Also detect if you born yet or an immortal, living more than over the century.
Select 1 to see when you be 100 year old
Select 2 to find your AGE in specific year:
Select 1 to see when you be 100 year old
Select 2 to find your age in specific year: 1
Enter your age or year of birth: 1563
you will be 100 years old in 1663
YOU seem to be oldst person alive
You are more than 100 years old.
Take age or year of birth as an input from the user. Store the input in one variable. Your program should detect whether the entered input is AGE or YEAR of birth(DOB) and tell the user when they will turn 100 years old.
Here are a few instructions that you must have to follow:
- Do not use any type of module like
DateTime
orDate utils
. - Users can optionally provide a year, and your program must tell their age in that particular year.
- Your code should handle all sorts of errors like :
- You are not yet born
- You seem to be the oldest person alive
- You can also handle any other errors, if possible!
Your laptop with 3.6.x (onwards) installed.
NOTE: Those with Linux and MacOSX would have Python installed by default, no action required.
Windows: Download the version for your laptop via https://www.python.org/downloads/
NOTES In your preferred editor, make sure indentation is set to "4 spaces".
- Clone or download repositiory: https://github.com/arevish/age-calci.git
- In source folder, run
python3 'age calci.py'
to start program, optionally, run with--help
argument to see other runtime options.