Roman Numerals Converter - How much do I need to know to be able to solve it?

Tell us what’s happening:

Hey guys, I am trying to solve it before having finished Functional Programming and Intermediate Algorithm Scripting. Can you tell me if the topics covered before Functional Programming in the Curriculum should be enough to solve this? Should I apply some concepts from Object Oriented Programming? Really it’s the first time I have no clue how to proceed, even despite having read all the three hints.

Your code so far


function convertToRoman(num) {
return num;
}

convertToRoman(36);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36.

Challenge: Roman Numeral Converter

Link to the challenge:

Hello!

There’s no need to apply any specific paradigm (OOP, functional or imperative programming).

These problems are focused on your problem solving skills and it’s common to get stuck.

Try to split the problem into smaller pieces and/or sorting each to fit the requirement.

What’s needed to solve the problem? I have to, somehow, decompose the decimal number into units which, in turn, have to be converted into a roman numeral.

So, the first problem: how to split the number passed to the function? One way would be to convert the number into a string and then think of each character as a unit.

Try to continue from there and if you find a better way to tackle the problem, please do so :slight_smile:.

Hope it helps,

Happy coding!

Hi, I’m following up on this thread because I have been thinking and drawing up possible solutions to this challenge but so far I have nothing plus I feel like I’m bent over backwards. Would it make sense to take a peek at a solution, try to figure out how it works, and then try to recreate it from memory after some time has passed? This is what I would do if I got really stuck learning a language

IMO, yes, it’s a good way of learning. However, instead of recreating it from memory, try to create your own solution, even if it’s bad (non-performant, ugly, whatever); that’s a good exercise.