Roman Numeral Converter

Published by Matt in

Create a function that takes an Arabic number and converts it into a Roman number.

Examples

convert_to_roman(2) ➞ "II"

convert_to_roman(12) ➞ "XII"

convert_to_roman(16) ➞ "XVI"

Notes

  • All roman numerals should be returned as uppercase.
  • The largest number that can be represented in this notation is 3,999.
Watch a quick demo on how Edabit works.