Package which contains function for converting between different number system
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for numeral_system_py-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75f9ec2d26b064408b87f21dd19adc1d164479059edf64da20967353014262c |
|
MD5 | 67d005e4bb66419dd503788457958e88 |
|
BLAKE2b-256 | 70d1f7834c1ea13166d9790ee4189d811a2e92ce6deec1dd4a0487c46deeeb51 |