to_roman

plasmapy.utils.roman.to_roman(n: Integral | integer) str[source]

Convert an integer to a Roman numeral.

Parameters:

n (int or integer) – 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:

str

Raises:

See also

from_roman

Examples

>>> to_roman(5)
'V'
>>> to_roman(2525)
'MMDXXV'