@@ -27,11 +27,7 @@ def run(self):
27
27
# label for year in which user was born
28
28
self .l2 = tk .Label (text = "Year: " , font = "courier 10" , bg = "lightblue" )
29
29
self .l2 .grid (row = 2 , column = 0 )
30
- #yearValue = tk.StringVar()
31
- #adding some checking to ensure its valid
32
30
yearValue = tk .StringVar ()
33
- #while yearValue.get() > 12 or yearValue.get() < 0:
34
- # yearValye = tk.IntVar()
35
31
self .yearEntry = tk .Entry (self .master , textvariable = yearValue , relief = "solid" )
36
32
self .yearEntry .grid (row = 2 , column = 1 , padx = 10 , pady = 10 )
37
33
@@ -51,6 +47,7 @@ def run(self):
51
47
52
48
53
49
def check_year ():
50
+ #simple method to check the validity of a user input birth year
54
51
self .statement .destroy ()
55
52
today = date .today ()
56
53
try :
@@ -67,6 +64,7 @@ def check_year():
67
64
return False
68
65
69
66
def check_month ():
67
+ #simple method to check the validity of a user input birth month
70
68
self .statement .destroy ()
71
69
try :
72
70
month = int (self .monthEntry .get ())
@@ -82,6 +80,7 @@ def check_month():
82
80
return False
83
81
84
82
def check_day ():
83
+ #simple method to check the validity of a user input birth day
85
84
self .statement .destroy ()
86
85
try :
87
86
day = int (self .dayEntry .get ())
0 commit comments