You can use this code-along to solve the Roman Numerals Encoder kata.
The task: Create a function taking an integer as its parameter and returning a string containing the Roman Numeral representation of that integer.
The Roman Numeral was the only written numbering system used in Ancient Rome and Europe until about 900 AD.
The Roman numbers were:
Symbol | Value |
---|---|
I | 1 |
V | 5 |
X | 10 |
L | 50 |
C | 100 |
D | 500 |
M | 1000 |
Roman numbers as an array: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
Arabic numbers as an array: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
The Red-Green-Refactor cycle of TDD. ๐