To complete this challenge, you'll need to make a function that takes an integer as input and returns a string with the roman numeral representation of that value. This chart may prove useful for checking your work.
When creating your function, there are different approaches you may want to consider:
Will your function have a simplistic elegance so that even a non-programmer would completely understand it?
Will it be computationally efficient?
Will you use some outside-the-box thinking in your algorithm?
Do you know some obscure Python library that you can utilize to do this simply and effotlessly?
Will you turn this into code golf and try to do it in as few lines as possible? I did it in 1 line
I can't wait to see your results!! As always, please remember to use spoiler tags.
P.S. After we get a few submissions, I'll share my 1-liner with you. It's ugly, but it's 1 line
ADVANCED CHALLENGE! (Can you handle it?)
Inspired by BetaWar A more advanced variation of this challenge would be to create a function that can compress a value into it's smallest possible Roman Numeral representation. For example, the number 49 evaluates to XLIX, but it could logically be written as IL (-1+50). This is a far more advanced topic, so hopefully this could tempt some of the more seasoned Programmers into giving this one a shot. THE GAUNTLET IS THROWN!
This post has been edited by atraub: 08 April 2015 - 07:08 PM

New Topic/Question
Reply



MultiQuote










|