to_roman
- plasmapy.utils.roman.to_roman(n: int) str [source]
Convert an integer to a Roman numeral.
- Parameters:
n (
int
orinteger
) – 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'