to_romanο
- plasmapy.utils.roman.to_roman(n: int) str[source]ο
Convert an integer to a Roman numeral.
- Parameters:
n (
intorinteger) β The integer to be converted to a Roman numeral that must be between 1 and 4999, inclusive.- Returns:
result β The number in Roman numeral notation.
- Return type:
- Raises:
TypeError β If the input is not an integer.
OutOfRangeError β If the number is not between 1 and 4999, inclusive.
See also
Examples
>>> to_roman(5) 'V' >>> to_roman(2525) 'MMDXXV'