Perform mathematical calculations and expressions. Use when: user needs to calculate numbers, percentages, or evaluate math expressions. Supports basic arithmetic, advanced functions, and variable storage.
Perform mathematical calculations with Python expressions.
✅ USE this skill when:
❌ DON'T use this skill when:
python3 -c "print(2 + 3 * 4)"
# Output: 14
python3 -c "print(200 * 0.15)"
# Output: 30.0
# Square root
python3 -c "import math; print(math.sqrt(144))"
# Power
python3 -c "print(2 ** 10)"
# Trigonometry
python3 -c "import math; print(math.sin(math.pi/2))"
python3 -c "
x = 10
y = 20
print(f'Sum: {x + y}')
print(f'Product: {x * y}')
"
abs(x) — Absolute valueround(x, n) — Round to n decimalspow(x, y) — x to the power of ymin(a, b, ...) — Minimum valuemax(a, b, ...) — Maximum valuesum([...]) — Sum of valuespython3 -c "import math; print(dir(math))"
math.sqrt(x) — Square rootmath.sin/cos/tan(x) — Trigonometrymath.log(x), math.log10(x) — Logarithmsmath.floor(x), math.ceil(x) — Roundingmath.pi, math.e — Constants"Calculate 15% of 200"
python3 -c "print(f'15% of 200 = {200 * 0.15}')"
"What's 2^10?"
python3 -c "print(f'2^10 = {2 ** 10}')"
"Square root of 144"
python3 -c "import math; print(f'√144 = {math.sqrt(144)}')"