Math Operations
Description
This Python module provides basic mathematical operations: addition, subtraction, multiplication, and squaring a number. It is designed to handle multiple arguments for addition, subtraction, and multiplication, and it includes a separate function for squaring a single number.
Functions
1. add(*args)
- Description: Takes multiple arguments and returns their sum.
- Usage:
result = add(1, 2, 3) # returns 6
2. subtract(*args)
- Description: Takes multiple arguments and subtracts them from left to right.
- Usage:
result = subtract(10, 5, 2) # returns 3 (10 - 5 - 2)
3. multiply(*args)
- Description: Takes multiple arguments and returns their product.
- Usage:
result = multiply(2, 3, 4) # returns 24
4. square(num)
- Description: Takes a single argument and returns its square.
- Usage:
result = square(4) # returns 16
Requirements
- Python 3.x
How to Run
- Clone or download the repository.
- Ensure you have Python 3.x installed on your system.
- Import the module into your project or run it directly in a Python script.
Example
from math_operations import add, subtract, multiply, square
print(add(1, 2, 3)) # Output: 6
print(subtract(10, 5, 1)) # Output: 4
print(multiply(2, 3, 4)) # Output: 24
print(square(5)) # Output: 25
Metadata
Release files for basic-maths-011 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| basic_maths_011-0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / basic_maths_011-0.3-py3-none-any.whl
| Download URL | basic_maths_011-0.3-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16b452de2274bda102ec453f5c5f308399db6983a4c60e5005f2cadb92920111
|
|
BLAKE2b-256 checksum How to use checksums |
245c74b245db4a9b3d0b221692128bcece3f585387da6a76e21befadf81db95e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Security for basic-maths-011 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.