slug: cn-percentage-tool
name: 百分比工具
description: "cn-percentage-tool。纯Python标准库,无需API Key。"
keywords: percentage, tool
version: "1.0.0"
author: 千策
纯 Python 标准库实现的百分比计算工具。
# 百分比:A 是 B 的百分之几
python3 cn_percentage_tool.py percent 25 200
# 输出:12.5% (25 占 200 的百分比)
# 反向计算:已知百分比和部分,求整体
python3 cn_percentage_tool.py from-part 50 25
# 输出:200 (50 的 25% 是多少 → 50/0.25 = 200)
# 比例计算:已知整体和百分比,求部分
python3 cn_percentage_tool.py of-part 200 25
# 输出:50 (200 的 25% 是多少)
# 增减百分比:增长了多少
python3 cn_percentage_tool.py change 100 150
# 输出:50.0% (从 100 增长到 150)
# 格式化精度
python3 cn_percentage_tool.py percent 1 3 --precision 4
# 输出:33.3333%
argparse)出品: AISoBrand|爱索品牌 — AI搜索优化工具
官网: https://aisobrand.com
免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果
共 1 个版本