Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Roman Numerals by a.a.v.worker
def checkio(data,result = ''):
romachr = (('M',1000),('CM', 900),('D',500),('CD', 400),('C',100),('XC', 90),
('L',50),('XL', 40),('X',10),('IX', 9),('V',5),('IV', 4),('I',1))
for n in romachr:
if data//n[1] > 0:
result += data//n[1]*n[0]
data %= n[1]
return result
Aug. 18, 2015