PWP Project
PWP Project
Semester : Sixth
Certificate
This is to certify that,
Roll No Enrollment No Name Exam Seat No.
23 2100590082 Joshi Jay Dilip 392347
Calculate age
4.0 Action plan:
Sr. Details of Planned Start Planned Finish Name of Responsible
No. Activity date date Team Members
def calculate_age():
try:
today = date.today()
day = int(day_entry.get())
month = int(month_entry.get())
year = int(year_entry.get())
birthdate = date(year, month, day)
age = today.year - birthdate.year - ((today.month, today.day) < (birthdate.month,
birthdate.day))
age_result.config(text='You are ' + str(age) + ' years old')
except:
showerror(title='Error', message='An error occurred while trying to ' \
'calculate age\nThe following could ' \
'be the causes:\n->Invalid input data\n->An empty field/fields\n'\
'Make sure you enter valid data and fill all the fields')
window = Tk()
window.title('Age Calculator')
window.geometry('500x260+430+300')
window.resizable(height=FALSE, width=FALSE)
label_style = ttk.Style()
label_style.configure('TLabel', foreground='#000000', font=('OCR A Extended', 14))
button_style = ttk.Style()
button_style.configure('TButton', foreground='#000000', font=('DotumChe', 16))
entry_style = ttk.Style()
entry_style.configure('TEntry', font=('Dotum', 15))
big_label = Label(window, text='AGE CALCULATOR', font=('OCR A Extended', 25))
window.mainloop()
5.0 Actual Resources Used:-
Fig 6.3.Enter the wrong date of birth and click on the “calculate age”, Age calculator shows the
this type of error.
7.0 Skill Developed/Learning outcome of this Micro-Project: