Skip to content

guyroyse/etruscan-numerals-kata

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Etruscan Numerals

Those crafty Romans stole everything. Art, religion, and -- as it turns out -- numbers. What we call "Roman" numerals are really Etruscan numerals.

But, just because the Romans stole their numbering system -- unlike modern numbers which totally weren't stolen from the Arabs -- doesn't mean that we can't have some fun coding up some converters.

Your job is to test-drive a function that converts from Arabic to Roman numerals. When you are done with that, write a function that goes the other way.

Here's a refresher on Etruscan ahem Roman numerals.

Basic Values

    1 = I
    5 = V
   10 = X
   50 = L
  100 = C
  500 = D
 1000 = M

Putting Them Together

    1 = I
    2 = II
    3 = III  (sensing a pattern here?)
    4 = IV   (maybe not)
    5 = V
    6 = VI
    7 = VII
    8 = VIII
    9 = IX
   10 = X
   23 = XXIII
   42 = XLII
 1776 = MDCCLXXVI
 2013 = MMXIII

If you are utterly unfamiliar with Roman numerals, I would suggest Google.

Hints

A good test to start with would be 1 returns I. 2 and 3 are good follow ons to it. But, the next best test is not necessarily the next number. Think aboue the code you want to test drive and what tests would drive your code in the direction you want it to go.

Have fun and semper ubi sububi!

About

Semper ubi sububi!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published