Skip to main content

calculator-utils

Performs basic arithmetic calculations including addition, subtraction, multiplication, and division. Use when the user needs to calculate numbers, perform math operations, or compute arithmetic expressions.

소스 정보

저장소
thangchung/agent-engineering-experiment
최근 소스 활동
2025년 12월 24일 13:29
감지된 SKILL.md 언어
영어
스타
27
포크
6

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
calculator-utils
description
Performs basic arithmetic calculations including addition, subtraction, multiplication, and division. Use when the user needs to calculate numbers, perform math operations, or compute arithmetic expressions.
license
MIT
metadata
{"author":"ai-labs","version":"1.0"}
# Calculator Utilities A basic calculator utility that provides fundamental arithmetic operations via a Python script. ## How to Use Run the calculator script with an operation and numbers: ```bash python scripts/calculator.py <operation> <numbers...> ``` ## Operations ### Add Adds all numbers together. ```bash python scripts/calculator.py add 5 3 # Output: 8 python scripts/calculator.py add 10 20 30 # Output: 60 ``` ### Subtract Subtracts all subsequent numbers from the first number. ```bash python scripts/calculator.py subtract 10 4 # Output: 6 python scripts/calculator.py subtract 100 25 15 # Output: 60 ``` ### Multiply Multiplies all numbers together. ```bash python scripts/calculator.py multiply 6 7 # Output: 42 python scripts/calculator.py multiply 2 3 4 # Output: 24 ``` ### Divide Divides the first number by all subsequent numbers. ```bash python scripts/calculator.py divide 20 4 # Output: 5.0 python scripts/calculator.py divide 100 2 5 # Output: 10.0 ``` ## Error Handling - **Division by zero**: Returns an error message - **Invalid input**: Non-numeric values will show an error - **Missing arguments**: Shows usage instructions ## Examples ```bash # Simple addition python scripts/calculator.py add 100 50 # Output: 150 # Chain subtraction python scripts/calculator.py subtract 1000 250 150 100 # Output: 500 # Multiply decimals python scripts/calculator.py multiply 3.14 2 # Output: 6.28 # Division with decimals python scripts/calculator.py divide 22 7 # Output: 3.142857142857143 ```
GitHub에서 보기