Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Exercise 4 - Roman numerals

In this exercise, you will get to solve a more complex problem than FizzBuzz. Apply the concepts you have learned in exercise 1 and 2. Remember the do's and dont's of pair programming.

4.1 Problem description

Implement a function that convers a number to roman numerals. An empty method is provided in exercise-4.js. The function should take a number as input and output a roman numeral string.

Try to implement it with small numbers first, then build up to larger numbers. Numbers larger than 500 should not be accepted by your function.

All the rules can be found here: https://www.mathsisfun.com/roman-numerals.html

Try to use test-driven development to drive the code towards a functioning converter.

Try to rotate every now and then. Do not neccecarily time every rotation, but try to rotate often and try to practice the "do's" of pair programming. (Ask for the keyboard, communicate clearly, be polite, talk about the problem, be constructive).


function convertRoman(number) {
    return "I";
}

A function has been created, simply returning the the roman numeral value for 1. Write your tests in exercise-4.tests.js while implementing the logic of your converter in exercise-4.js.