Skip to content

The Personal Information Calculator is a Python program that collects various personal information from the user, such as their name, email, and age, and then calculates and displays several time-related metrics based on the user's age.

Notifications You must be signed in to change notification settings

MMTalal/PersonalInformationCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Personal Information Calculator

The Personal Information Calculator is a Python program that collects various personal information from the user, such as their name, email, and age, and then calculates and displays several time-related metrics based on the user's age.

Table of Contents

Installation and Setup

This program requires Python 3.x to be installed on your system. To run the program, simply save the code to a file (e.g., personal_info_calculator.py) and execute it using the following command:

python personal_info_calculator.py

Usage

When you run the program, it will prompt you to enter the following information:

  1. Your first name
  2. Your middle name
  3. Your last name
  4. Your email address

After you provide this information, the program will display:

  • Your full name
  • Your username, website, and domain (extracted from the email address)
  • Your age in years
  • The number of months, weeks, days, hours, minutes, and seconds you have lived

Finally, the program will thank you for using it.

Code Structure

The code is organized into the following sections:

  1. Greeting and Name Collection: The program starts by printing the title and collecting the user's first, middle, and last name.
  2. Email Processing: The program then collects the user's email address and extracts the username, website, and domain.
  3. Age and Time Metrics Calculation: The program collects the user's age and calculates various time-related metrics (months, weeks, days, hours, minutes, seconds).
  4. Output Formatting and Display: The program formats the output and displays the user's information and the calculated time metrics.
  5. Closing Message: The program concludes by thanking the user for their experience.

Comments and Documentation

The code includes detailed comments that explain the purpose and functionality of each section. These comments are designed to make the code more self-documenting and easier for others (or your future self) to understand and maintain.

Future Enhancements

Future enhancements to this program could include:

  • Validating user input to handle invalid or incomplete data
  • Allowing the user to save their personal information to a file or database
  • Implementing additional time-related calculations (e.g., years, decades)
  • Providing the option to calculate the user's lifespan based on average life expectancy

Contributing

If you find any issues or have suggestions for improvements, please feel free to submit a GitHub issue or a pull request. Contributions are welcome and appreciated!

Contact

If you have any questions or feedback, you can reach me at [mm.talal-95@yahoo.com] or through my GitHub profile at [https://github.com/MMTalal].

About

The Personal Information Calculator is a Python program that collects various personal information from the user, such as their name, email, and age, and then calculates and displays several time-related metrics based on the user's age.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages