Skip to content

Commit e1615aa

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 2f724d9 according to the output from Autopep8. Details: None
1 parent 9b91a39 commit e1615aa

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)