Skip to main content

Package which contains function for converting between different number system

Project description

License Release Supported versions Docs Code Coverage Build status Appveyor Build Status Travis CI Contact Blog

numeral-system-py

Convert from one numeric system to other in python.

Supports following:

  • roman numerals

  • positional numerals (like binary, arabic (decimal), hexadecimal and others)

Example of usage

Roman

>>> import numeral_system
>>> numeral_system.roman.encode(7)
'VII'
>>> numeral_system.roman.decode('XXII')
22

Positional

>>> import numeral_system
>>> numeral_system.positional.encode(42, 2)
'101010'
>>> numeral_system.positional.encode(12, 3)
'110'
>>> numeral_system.positional.decode(101, 2)
5
>>> numeral_system.positional.decode('AF', 16)
175

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numeral-system-py-0.2.0.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

numeral_system_py-0.2.0-py2.py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page