Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blue-yonder/tdd_exercise_roman
A small exercise for practicing test-driven development (TDD)
https://github.com/blue-yonder/tdd_exercise_roman
cpp python roman-numerals tdd tdd-kata test-driven-development
Last synced: 18 days ago
JSON representation
A small exercise for practicing test-driven development (TDD)
- Host: GitHub
- URL: https://github.com/blue-yonder/tdd_exercise_roman
- Owner: blue-yonder
- License: mit
- Created: 2016-11-18T09:20:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-11T15:19:56.000Z (about 7 years ago)
- Last Synced: 2024-11-17T04:34:00.010Z (3 months ago)
- Topics: cpp, python, roman-numerals, tdd, tdd-kata, test-driven-development
- Size: 43.9 KB
- Stars: 1
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Roman numerals TDD kata
Test-driven development is a software development process that
basically puts writing a failing unit test before modifying your
production code. This repository provides scaffolds for various
programming languages for hassle-free first steps in the world
of TDD by solving a simple task.# The task
Your task is the following: Practicing test-driven development,
implement a function that converts Arabic numbers (1-3999) to
Roman numerals.If your memory of Roman numerals is a little foggy, you can head over
to [wikipedia](https://en.wikipedia.org/wiki/Roman_numerals)
or refer to this conveniently placed table:| Ones | | Tens | | Hundreds | | Thousands |
|----------|---|-----------|---|------------|---|------------|
| 1 = I | | 10 = X | | 100 = C | | 1000 = M |
| 2 = II | | 20 = XX | | 200 = CC | | 2000 = MM |
| 3 = III | | 30 = XXX | | 300 = CCC | | 3000 = MMM |
| 4 = IV | | 40 = XL | | 400 = CD | | |
| 5 = V | | 50 = L | | 500 = D | | |
| 6 = VI | | 60 = LX | | 600 = DC | | |
| 7 = VII | | 70 = LXX | | 700 = DCC | | |
| 8 = VIII | | 80 = LXXX | | 800 = DCCC | | |
| 9 = IX | | 90 = XC | | 900 = CM | | |You can combine the numbers listed above, ordering larger to smaller
numbers left to right. Here are a few examples:* 407 = CDVII
* 2017 = MMXVII
* 3888 = MMMDCCCLXXXVIII# Quickstart with C++
Follow the instructions in the `README.md` file in the `cpp` branch:
```
> git clone https://github.com/blue-yonder/tdd_exercise_roman.git
> cd tdd_exercise_roman
> git checkout cpp
> cat README.md
```# Quickstart with Python
Follow the instructions in the `README.md` file in the `python` branch:
```
> git clone https://github.com/blue-yonder/tdd_exercise_roman.git
> cd tdd_exercise_roman
> git checkout python
> cat README.md
```