Convert roman numeral to number and manage roman number object
Project description
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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roman_numbers-1.0.2.tar.gz.
File metadata
- Download URL: roman_numbers-1.0.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb84b7755ba972d549e73fac1c100f0eeb9fc247474d43d0f433c0b72152c699
|
|
| MD5 |
d68856e6758e79dc07f51b79588fd2fb
|
|
| BLAKE2b-256 |
95cee9f6b0d260f48713f2d735e0986ee4ead311cd168c217c5f94b0fad6817b
|
File details
Details for the file roman_numbers-1.0.2-py3-none-any.whl.
File metadata
- Download URL: roman_numbers-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffbc00aaf41538208f975d1b1ccfe80372bae1866e7cd632862d8c6b45edf447
|
|
| MD5 |
f2985ace8c4baec74aa7cb5fad642e15
|
|
| BLAKE2b-256 |
9a8509e9e6bd6cd4cc0ed463d2b6ce3c7741698d45ca157318730a1346df4819
|