simple-rounder
A simple Python library for rounding numbers up, down, or mathematically.
import simple_rounder as rounder
print(rounder.up(10.52)) # 11.0
print(rounder.down(10.52)) # 10.0
print(rounder.mathematical(10.52)) # 11.0
You can specify the number of decimal places
rounder.mathematical(10.25, 1) # 10.3
rounder.mathematical(567.1, -1) # 570
You can use named arguments
rounder.up(number=500, number_of_decimal_places=-2) # 500
rounder.up(number=501, number_of_decimal_places=-2) # 600
Recommended import variations
import simple_rounder as rounder
from simple_rounder import rounder
from simple_rounder import up, down, mathematical
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simple_rounder-0.1.0.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_rounder-0.1.0.tar.gz.
File metadata
- Download URL: simple_rounder-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba2b400caf66680dff2c406d5053bd272c56c976911686f4ceabc13f8aebd9d
|
|
| MD5 |
7f8081c0362c2622ad9ee1cb37c8743e
|
|
| BLAKE2b-256 |
30ada19c3338e13e000d70ab1c3e61aa2617a6e83029bc512e9c967a7a7916ce
|
File details
Details for the file simple_rounder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: simple_rounder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84f1a760fd994b8a601d3d9fd00283caeb6adbd186284a80c3ec9d9fc25a21a2
|
|
| MD5 |
e05147a8f1029e3c6f6d88edb0cd3057
|
|
| BLAKE2b-256 |
a8fd353dc863dd4b0e37ac57227a4fa468985113f98005bec2afd410fcb5640f
|