<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def toRoman(num):
 """convert integer to Roman numeral"""

    if not 0 < num < 5000:
        raise ValueError("number %n out of range (must be 1..4999)", num)
    if int(num) != num:
        raise TypeError("decimals %n can not be converted", num)

    result = ""
    for numeral, integer in romanNumeralMap:
        while num >= integer:
            result += numeral
            num -= integer
    return result