def Roman(n):
    n = int(n) # Raises TypeError.
    if n < 1:
        raise ValueError("roman numeral for zero or negative undefined: " + n)
    roman = ''
    while n >= 1000:
            n = n - 1000
            roman = roman + 'M'
    while n >= 500:
            n = n - 500
            roman = roman + 'D'
    while n >= 100:
            n = n - 100
            roman = roman + 'C'
    while n >= 50:
            n = n - 50
            roman = roman + 'L'
    while n >= 10:
            n = n - 10
            roman = roman + 'X'
    while n >= 5:
            n = n - 5
            roman = roman + 'V'
    while n < 5 and n >= 1:
            n = n - 1
            roman = roman + 'I'
    roman = roman.replace('DCCCC', 'CM')
    roman = roman.replace('CCCC', 'CD')
    roman = roman.replace('LXXXX', 'XC')
    roman = roman.replace('XXXX', 'XL')
    roman = roman.replace('VIIII', 'IX')
    roman = roman.replace('IIII', 'IV')
    return roman
dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tools/MondoReport.py/Roman/original