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.2.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.2.tar.gz.
File metadata
- Download URL: simple_rounder-0.1.2.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 |
1fa46cb8adbbedba3c12fce2fa41a2063ad30b3d61ee419108b4e73af2674739
|
|
| MD5 |
363458c1ca85fc4cfc870126e8564cbd
|
|
| BLAKE2b-256 |
fc3aeb115f173932edc30609812c6c9262599a5a1bee7dc9a405edda74926aa0
|
File details
Details for the file simple_rounder-0.1.2-py3-none-any.whl.
File metadata
- Download URL: simple_rounder-0.1.2-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 |
a2fbb0a44ac8813c7cb3bbc7a5562bd46f6daa998271b28c94c380ffad9840dc
|
|
| MD5 |
9c8a118c415248bf4a768d68bd0fb769
|
|
| BLAKE2b-256 |
ba46f64152c921bdf7f24bb121e4d025a023ba067fcee29d661ca845b8eaaa43
|