Question: Please give detailed explanations beside every code. 6. Roman-ish numerals Roman numerals are slightly tricky: the same letter should not be used more than 3

Please give detailed explanations beside every code. Please give detailed explanations beside every code. 6. Roman-ish numerals Roman numeralsare slightly tricky: the same letter should not be used more than 3 times, so 4 isn't IIII, its IV. In this part of

6. Roman-ish numerals Roman numerals are slightly tricky: the same letter should not be used more than 3 times, so 4 isn't IIII, its IV. In this part of the question, however, we will be lazy: we can use the same letter up to 4 times. Write a Python function romanish that takes an integer smaller than 1000 and returns a string representation in this lazy form of Roman numerals. Example: romanish(1) == 'I' romanish(5) == 'V' romanish(9) == 'VIIII romanish(39) == 'XXXVIIII romanish(50) == 'L' romanish(100) == 'C' romanish(500) == 'D' Try to do this question using a list/tuple. Hint: this is not too different from making change. 7. Roman numerals, the full version Write a function that converts an integer to its true Roman numeral representation: Write a Python function roman(n) that takes an integer and returns a string represen- tation. Try to use lists or dictionaries! Example: roman(1) == 'I' roman(5) == 'V' roman(9) == 'IX' roman(39) == 'XXXIX' roman(50) == 'L' roman(100) == 'C' roman(500) == 'D' roman(999) == 'CMXCIX

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!