Integer to roman numeral
Converts an integer to its roman numeral representation.
Accepts value between 1 and 3999 (both inclusive).
- Create a lookup list containing tuples in the form of (roman value, integer).
- Use a
forloop to iterate over the values inlookup. - Use
divmod()to updatenumwith the remainder, adding the roman numeral representation to the result.