Skip to content

devadvent/puzzle-13

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ℹ️ For detailed information about the contest, check out devadvent/readme

Dev Advent Calendar 🎅 Puzzle 13 - Number Conversion 🏛️

For hundreds of years, the elves have been working with roman numerals. They use it everywhere - in file cabinets, in notes, etc. This was okay when the numbers were smaller. But some index cards sure are getting big, and the roman version of reading it is just not practical anymore.

Therefore once again the head elf 🧝 counts on your help.

🧩 The puzzle

Complete the function romanToArabic in src/utils/roman.js.

The parameter input is a string of roman numerals, either in lower- or uppercase (e.g. CXXIII or cxxiii).

Return the arabic number for a given roman number.

You can assume the numbers will be between 1 and 99999.

📖 Learn more about roman numerals 🧪 Online converter to try out some values

🚢 Ship your solution

Check out the contributing guide for details about how to participate.

In short:

  • ✨ Create your repository by acceping the assignment using the participation link
  • 🧩 Solve the puzzle
  • 🐦 Add your Twitter handle to twitter.js
  • 🤖 Test your solution
  • 🚀 Upload your changes to the main branch

🔗 Participation link

In order to participate, you need to enter the following link and accept the assignment: https://classroom.github.com/a/r6od1WSS

💻 Use this project

⏳ Install the dependencies

Install the dependencies with

yarn install

or

npm install

⚙️ Run the code

Run the code with

yarn dev

or

npm run dev

🤖 Test your solution

This puzzle is equipped with automated tests (in the ./tests folder). In order for your solution to qualify for winning the daily prize, all tests need to pass.

To run these tests, execute one of the following commands in your console:

yarn test

or

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages