Bmi计算器
介绍
这是一个简单的BMI计算器,可以根据用户输入的身高和体重,计算并显示其BMI值。 bmi计算公式: $$BMI = \frac{体重}{身高^2}$$ 其中,身高单位为m, 体重单位为kg。
使用方法
- Gui版本:
-
- 打开Gui版本的Bmi计算器,输入自己的身高和体重,点击计算按钮,即可得到BMI值。
- 命令行版本:
-
- 打开命令行
-
- 输入命令,命令格式见下文
- python库版本:
-
- pip安装:
pip install bmicalc
- pip安装:
-
- 使用bmicalc库,代码接口见下文
命令行版本
命令格式:
bmicalc [身高] [体重]
代码接口
from bmicalc import calc
# 计算BMI值
bmi = calc(height, weight) # 请替换height和weight为实际的身高和体重
print("您的BMI值为:", bmi)
Metadata
Release files for bmi-healthy-calculator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bmi_healthy_calculator-0.1.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bmi_healthy_calculator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / bmi_healthy_calculator-0.1.0.tar.gz
| Download URL | bmi_healthy_calculator-0.1.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bda066aa6c3b6a453724c4496f19bb2e20820be5cc1ed9220a078fc10fe27cc
|
|
BLAKE2b-256 checksum How to use checksums |
e5626596de2c1a0d3fb386b35a8e2328f2071ae4d3135c67aed30c86df843497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / bmi_healthy_calculator-0.1.0-py3-none-any.whl
| Download URL | bmi_healthy_calculator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
760690965e4d5e469dd8492cd7e35bee14f466880224ab1c31c3fa3859f02af5
|
|
BLAKE2b-256 checksum How to use checksums |
039c61dd5422a81704d82fb1abea456ed7686856a9f51c63beadfcb94e04774f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|