Roman numerals
Manage roman numerals using roman number object.
Convert roman numeral to integers
romanfunction
return roman numeral string
import roman_numbers as r
x = 10
print(r.roman(x))
Output:
>> X
roman(number:int, extend=1)extended function
return roman numeral string
import roman_numbers as r
x = 7580
print(r.roman(x, extend=1))
Output:
>> V̅MMDLXXX
numberfunction
return integers from roman numeral
import roman_numbers as r
x = 'X'
print(r.number(x))
Output:
>> 10
romobject
support Basic and Compare opeartion for roman numeral
from roman_numbers import rom
>> rom(10) + rom(10) # add
>> XX
>> rom(5) - rom(1) # sub
>> IV
>> rom(5) * 3 # mul
>> XV
>> rom('V') > rom('XI') # compare
>> False
>> rom('V') == 5 # compare
>> True
>> int(rom('XI'))
>> 11
Version
1.0.1 - Release 1.0.2 - Add description and minor fix
Metadata
Release files for roman-numbers 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| roman_numbers-1.0.2.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| roman_numbers-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.3 kB
Release files / roman_numbers-1.0.2.tar.gz
| Download URL | roman_numbers-1.0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb84b7755ba972d549e73fac1c100f0eeb9fc247474d43d0f433c0b72152c699
|
|
BLAKE2b-256 checksum How to use checksums |
95cee9f6b0d260f48713f2d735e0986ee4ead311cd168c217c5f94b0fad6817b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
|
Release files / roman_numbers-1.0.2-py3-none-any.whl
| Download URL | roman_numbers-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffbc00aaf41538208f975d1b1ccfe80372bae1866e7cd632862d8c6b45edf447
|
|
BLAKE2b-256 checksum How to use checksums |
9a8509e9e6bd6cd4cc0ed463d2b6ce3c7741698d45ca157318730a1346df4819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.3
|