Skip to content

Commit 2b06da3

Browse files
Update bmicalculator.py
1 parent 310b6b1 commit 2b06da3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

venv/bmicalculator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def findBMI(self):
5050
height = self.height_var.get()
5151
# When the height and weight are empty or filled with space
5252
if weight=="" or weight.isspace() or height=="" or height.isspace():
53+
self.bmiLabel.config(text="")
5354
self.result.config(text="Height and Weight cannot be empty",bg="brown",fg="white",font=("Tahoma",15))
5455
# when height and weight are input properly as numbers
5556
elif weight.isdecimal() and height.isdecimal():
@@ -76,6 +77,7 @@ def findBMI(self):
7677
self.result.config(text="Extremely Obese", bg="red", fg="white",font=("Cambria",23))
7778
else:
7879
# When the entered input in height and weight fiels is not numbers
80+
self.bmiLabel.config(text="")
7981
self.result.config(text="Enter numbers only please",bg="red",font=("Arial",18))
8082
# object created for the class 'BmiCalculator'
8183
BmiCalculator()

0 commit comments

Comments
 (0)