Skip to main content

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

https://github.com/konstantin10return/simple_rounder

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_rounder-0.1.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

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

Hashes for simple_rounder-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1fa46cb8adbbedba3c12fce2fa41a2063ad30b3d61ee419108b4e73af2674739
MD5 363458c1ca85fc4cfc870126e8564cbd
BLAKE2b-256 fc3aeb115f173932edc30609812c6c9262599a5a1bee7dc9a405edda74926aa0

See more details on using hashes here.

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

Hashes for simple_rounder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2fbb0a44ac8813c7cb3bbc7a5562bd46f6daa998271b28c94c380ffad9840dc
MD5 9c8a118c415248bf4a768d68bd0fb769
BLAKE2b-256 ba46f64152c921bdf7f24bb121e4d025a023ba067fcee29d661ca845b8eaaa43

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page