Skip to content

Commit e128ba3

Browse files
Merge pull request #1605 from Shiv-Expert2503/master
'Fixed_half_input_statement'
2 parents 132a078 + 6ac3642 commit e128ba3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Age-Calculator-GUI/age_calc_gui.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def check_year():
5353
try:
5454
year = int(self.yearEntry.get())
5555
if today.year - year < 0:
56-
self.statement = tk.Label(text=f"{nameValue.get()}'s age cannot be negative.", font="courier 10", bg="lightblue")
56+
self.statement = tk.Label(text=f"{nameValue.get()}'s age\n cannot be negative.", font="courier 10", bg="lightblue")
5757
self.statement.grid(row=6, column=1, pady=15)
5858
return False
5959
else:
6060
return True
6161
except Exception as e:
62-
self.statement = tk.Label(text=f"{nameValue.get()}'s birth year cannot parse to int.", font="courier 10", bg="lightblue")
62+
self.statement = tk.Label(text=f"{nameValue.get()}'s birth year\n cannot parse to int.", font="courier 10", bg="lightblue")
6363
self.statement.grid(row=6, column=1, pady=15)
6464
return False
6565

@@ -69,13 +69,13 @@ def check_month():
6969
try:
7070
month = int(self.monthEntry.get())
7171
if month < 0 or month > 12:
72-
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month is outside 1-12.", font="courier 10", bg="lightblue")
72+
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month\n is outside 1-12.", font="courier 10", bg="lightblue")
7373
self.statement.grid(row=6, column=1, pady=15)
7474
return False
7575
else:
7676
return True
7777
except Exception as e:
78-
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month cannot parse to int.", font="courier 10", bg="lightblue")
78+
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month\n cannot parse to int.", font="courier 10", bg="lightblue")
7979
self.statement.grid(row=6, column=1, pady=15)
8080
return False
8181

@@ -85,13 +85,13 @@ def check_day():
8585
try:
8686
day = int(self.dayEntry.get())
8787
if day < 0 or day > 31:
88-
self.statement = tk.Label(text=f"{nameValue.get()}'s birth day is outside 1-31.", font="courier 10", bg="lightblue")
88+
self.statement = tk.Label(text=f"{nameValue.get()}'s birth day is\n outside 1-31.", font="courier 10", bg="lightblue")
8989
self.statement.grid(row=6, column=1, pady=15)
9090
return False
9191
else:
9292
return True
9393
except Exception as e:
94-
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month cannot parse to int.", font="courier 10", bg="lightblue")
94+
self.statement = tk.Label(text=f"{nameValue.get()}'s birth month\n cannot parse to int.", font="courier 10", bg="lightblue")
9595
self.statement.grid(row=6, column=1, pady=15)
9696
return False
9797

0 commit comments

Comments
 (0)