Skip to content

Detect entered value is AGE or in YEAR and tell your age in a particular year or when you will be 100. Also detect if you born yet or an immortal, living more than over the century.

Notifications You must be signed in to change notification settings

arevish/age-calci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Age Calculator forthebadge

Description

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. 

Scenario

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.

Instructions to follow

Here are a few instructions that you must have to follow:

  1. Do not use any type of module like DateTime or Date utils.
  2. Users can optionally provide a year, and your program must tell their age in that particular year.
  3. 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!

PRE-REQUISITES

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".

Run using Python3.8+

  1. Clone or download repositiory: https://github.com/arevish/age-calci.git
  2. In source folder, run python3 'age calci.py' to start program, optionally, run with --help argument to see other runtime options.

About

Detect entered value is AGE or in YEAR and tell your age in a particular year or when you will be 100. Also detect if you born yet or an immortal, living more than over the century.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages