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.

Files for numeral-system-py, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size numeral_system_py-0.2.0-py2.py3-none-any.whl (6.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size numeral-system-py-0.2.0.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page