This Python program extracts information from a Sri Lankan National Identity Card (NIC) number. It provides the user's birthday, day of the week they were born, and their gender.
This Python program takes a Sri Lankan National Identity Card (NIC) number as input and extracts information such as the user's birthday, the day of the week they were born, and their gender.
- Python 3.x
- Run the script in a Python environment.
- Enter your NIC number when prompted.
- The program will validate the NIC number and extract information about your birthday, the day you were born, and your gender.
The validate
function checks if the NIC number is valid by ensuring it is exactly 12 digits and contains only numeric characters.
The get_born_year
function extracts the birth year from the NIC number.
The get_born_date
function calculates the exact birth date based on the NIC number.
The get_gender
function determines the gender based on the NIC number.
The user is prompted to enter their NIC number. The program validates the input to ensure it is a valid NIC number.
The program outputs the user's birthday, the day of the week they were born, and their gender based on the NIC number.
Feel free to contribute, report issues, or suggest improvements!