Hello, I'm doing a Converter, from Roman to arabic and the other way.
Now I need help to do a program who can do bigger numbers/letters than 3999.
I must use the information: (M) is 1000 *1000 and (L)= 50 * 1000 etc. So ( ) means 1000.
I must fix a code so I can write roman letters (bigger than 3999) to arabic and arabic(bigger than 3999) to roman letters.
HELP ME!!!

For exemple= 40 500 is = (XL)D
Example 2 = (X)CXI = 10 111
Help me!

I do not see your code and explanation of what you have tried/error messages, algorithm you are using. In sufficient data to help you.

Everything is working, i can coverte from roman to arabic and viseversa but now when i'm writing in a number or romanletter you kan se like for exemple ten M.s in a row and that's wrong! I just need help whit the definition/function. Is it an "if"? if numbers>4000
return ...
I have no clue!

If you have working code, you can just separate the paranthesis part and other part and process them separately, then combine the results.

i have two functions, the first is def arabicToRoman with two lists, one with roman letters and one with arabic numbers and then a function who doing the arabic to roman.

After I have another function : def romanToArabic and then two dictionnaries, one with the most common arabic number with its roman key and dict2 is with all the odd roman keys and arabic numbers , for exemple 4.

where shall i do something in this code to make it over 4000, with the parantheses , for exemple (M)=1000000

I must fix a code so I can write roman letters (bigger than 3999)

For Arabic, if it is larger than 3999 subtract 1000 and add 1000 to a separate field until it is less than 4000. You would then divide the "thousands" field by 1000, convert and print with parentheses, since 4000=(IV). Do the reverse for Roman, i.e. convert then parens to Arabic and multiply by 1000, then add to the rest of the number.

Edited 6 Years Ago by woooee: n/a

This question has already been answered. Start a new discussion instead.