''' Write Python code which transfers decimal numerals into Roman numerals: I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000 In Roman numerals, it is not allowed to have 4 identical characters consecutively. For example, if we want to convert 41 into Roman numerals, XXXI is wrong, and XLI is right (think of XLI as 50-10+1). Exercise A: Use a random user input between 1 and 4000 and automatically rewrite it into Roman numerals. In this part of the exercise, 1249 = MCCXXXXVIII is allowed, so it is OK to have 4 consecutive identical characters. ''' # Your code here ''' Exercise B: Adapt the code in order to check for 4 consecutive identical characters and correct the number, such that e.g. 1209 becomes MCCIX. The largest number is 3999, corresponding to MMMCMXCIX. ''' # Your code here