360 Secure SkillHub
360 安全技能中心

Cn Tip Calculator

核心功能:支持按15%/18%/20%/25%等常见比例或自定义比例计算小费,可将账单拆分给多人。典型场景:餐厅用餐后快速核算小费、分摊账单。通过命令行传入账单金额、小费比例、拆分人数等参数,输出小费金额、总金额及人均金额(若拆分)。工具基于纯Python开发,无外部依赖,使用便捷。

freedompixels
freedompixels
热度 45.69
最近更新 2026-06-07 10:36:24
分类:生活依赖:代码执行应用场景:个人理财

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cn-tip-calculator
Metadata
slug
cn-tip-calculator
name
Tip Calculator
version
1.0.0
description
Calculate tips and split bills. Support custom tip percentages, bill splitting, and currency formatting. Pure Python standard library, no API key required.
keywords
tip, calculator, bill, split, restaurant, gratuity
license
MIT-0
tags
["tools"]

Tip Calculator

Calculate tips and split bills at restaurants.

Features

  • Calculate tip amount from bill total and percentage
  • Split bills among multiple people
  • Common tip percentages (15%, 18%, 20%, 25%)
  • Custom tip percentage support
  • Pure Python, no external dependencies

Usage

python3 scripts/tip_calculator.py --bill 85.50 --tip 18
python3 scripts/tip_calculator.py --bill 120.00 --tip 20 --split 4

Output

Returns tip amount, total, and per-person amount when splitting.


出品: AISoBrand|爱索品牌 — AI搜索优化工具
官网: https://aisobrand.com
免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果