Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Roman Numerals by darasg2008
def checkio(data):
tab=[1000,900,500,400,100,90,50,40,10,9,5,4,1]
rom=['M','CM','D','CD','C','XC','L','XL','X','IX','V','IV','I']
i=0
w=""
while data>0:
while data>=tab[i]:
w=w+rom[i]
data=data-tab[i]
i=i+1
return w
Oct. 26, 2016