Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
minghe-cwrs authored Oct 1, 2024
1 parent edb6bc3 commit fbda6fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions BMIC.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
while True:

w = input("输入体重[千克/公斤]\n[local]~#")
print()
h = input("输入身高[米]\n(带小数点)\n[local]~#:")
w = float(w)
h = float(h)
ht = h*h
ht = float(ht)
bmi = w/ht
bmi = str(bmi)
print()
print("您的BMI为:" + bmi)

print()
bmi = float(bmi)

if bmi < 18.5:
Expand All @@ -29,5 +32,6 @@
elif bmi >= 35:
print("您这...")
print("赶紧打电话咨询营养师吧!")


print()
input("程序到此结束,按任意键继续!\n(程序会不停循环 直到您关掉为止)")

0 comments on commit fbda6fa

Please sign in to comment.