Skip to content

Commit 285440d

Browse files
Merge pull request #2819 from avinashkranjan/deepsource-transform-f941f167
format code with autopep8
2 parents 1c89b1c + e1615aa commit 285440d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

BMI Calculator/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
app = Flask(__name__)
44

5+
56
def calculate_bmi(weight, height):
67
height_in_meters = height / 100
78
bmi = weight / (height_in_meters ** 2)
89
return bmi
910

11+
1012
def interpret_bmi(bmi):
1113
if bmi < 18.5:
1214
return "Underweight"
@@ -17,6 +19,7 @@ def interpret_bmi(bmi):
1719
else:
1820
return "Obese"
1921

22+
2023
@app.route("/", methods=["GET", "POST"])
2124
def index():
2225
if request.method == "POST":
@@ -30,5 +33,6 @@ def index():
3033

3134
return render_template("index.html")
3235

36+
3337
if __name__ == "__main__":
3438
app.run(debug=True)

0 commit comments

Comments
 (0)