Skip to content

Commit

Permalink
Merge pull request #942 from Codes-Talent/master
Browse files Browse the repository at this point in the history
Improve Docs
  • Loading branch information
geekcomputers authored Jul 29, 2023
2 parents 86f34a6 + c6494fc commit a97d18a
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributor Covenant Code of Conduct
# Contributor Covenant Code of Conduct Easy to understand

## Our Pledge

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing
# Contributing Notepad Sorting

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
Expand Down
69 changes: 69 additions & 0 deletions agecalculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
from _datetime import datetime
import tkinter as tk
from tkinter import ttk
from _datetime import *

win = tk.Tk()
win.title('Age Calculate')
win.geometry('310x400')
# win.iconbitmap('pic.png') this is use extention ico then show pic

############################################ Frame ############################################
pic = tk.PhotoImage(file=r"E:\Python Practice\Age_calculate\pic.png")
win.tk.call('wm','iconphoto',win._w,pic)


canvas=tk.Canvas(win,width=310,height=190)
canvas.grid()
image = tk.PhotoImage(file=r"E:\Python Practice\Age_calculate\pic.png")
canvas.create_image(0,0,anchor='nw',image=image)

frame = ttk.Frame(win)
frame.place(x=40,y=220)



############################################ Label on Frame ############################################

name = ttk.Label(frame,text = 'Name : ',font = ('',12,'bold'))
name.grid(row=0,column=0,sticky = tk.W)

year = ttk.Label(frame,text = 'Year : ',font = ('',12,'bold'))
year.grid(row=1,column=0,sticky = tk.W)

month = ttk.Label(frame,text = 'Month : ',font = ('',12,'bold'))
month.grid(row=2,column=0,sticky = tk.W)

date = ttk.Label(frame,text = 'Date : ',font = ('',12,'bold'))
date.grid(row=3,column=0,sticky = tk.W)

############################################ Entry Box ############################################
name_entry = ttk.Entry(frame,width=25)
name_entry.grid(row=0,column=1)
name_entry.focus()

year_entry = ttk.Entry(frame,width=25)
year_entry.grid(row=1,column=1,pady=5)

month_entry = ttk.Entry(frame,width=25)
month_entry.grid(row=2,column=1)

date_entry = ttk.Entry(frame,width=25)
date_entry.grid(row=3,column=1,pady=5)


def age_cal():
name_entry.get()
year_entry.get()
month_entry.get()
date_entry.get()
cal = datetime.today()-(int(year_entry))
print(cal)


btn = ttk.Button(frame,text='Age calculate',command=age_cal)
btn.grid(row=4,column=1)



win.mainloop()

0 comments on commit a97d18a

Please sign in to comment.