Documentation Index
Fetch the complete documentation index at: https://mintlify.com/WorkTeam01/team-practice/llms.txt
Use this file to discover all available pages before exploring further.
src/calculator.py is the pure-math core of the calculator. All functions are stateless, accept float arguments, and return float. Both the GUI and CLI import from this module, making it the single source of truth for every arithmetic operation the application supports.
Importing the module
add(a, b)
Sums two numbers and returns the result.
First operand.
Second operand.
float — the sum of a and b.
subtract(a, b)
Subtracts the subtrahend from the minuend and returns the difference.
Minuend (the number being subtracted from).
Subtrahend (the number to subtract).
float — the difference a − b.
multiply(a, b)
Multiplies two numbers and returns the product.
First factor.
Second factor.
float — the product of a and b.
divide(a, b)
Divides the dividend by the divisor and returns the quotient.
Dividend.
Divisor. Must not be
0.float — the quotient a / b.
power(base, exponent)
Raises a base number to the given exponent.
The base number.
The exponent. Fractional exponents (e.g.
0.5) compute roots.float — the result of base ** exponent.
valor_maximo(a, b)
Returns the larger of two values.
First number.
Second number.
float — a if a > b, otherwise b. When both values are equal, returns b.
valor_minimo(a, b)
Returns the smaller of two values.
First number.
Second number.
float — a if a < b, otherwise b. When both values are equal, returns b.
abs_value(a)
Returns the absolute (non-negative) value of a number.
The number whose absolute value is requested.
float — the absolute value of a. Negative numbers become positive; positive numbers are returned unchanged.
All eight functions are pure — they have no side effects, modify no global state, and do not perform I/O. They are safe to import and call directly in any context, including tests, scripts, or other modules.
