1. #### Critical thinking

I'm posting here because it's a pretty basic/general question. I found this story and after laughing at the logic behind it, thought it'd be fun to try the puzzle myself. I've figured out some of the meatier logic and what I have so far actually works pretty well, here's an overview:

1. Ask for the number to convert
4. Try to look up the digit in a dictionary of values (using python to write this), if the value is there, just return that, if not continue to step 4
4. Break the digit down, so 23 would be 20 and 3, or XXIII.

And here is where I'm getting stuck. When I look at a number like 23, I realize that that's really 10 + 10 + 3 and then I can write out XXIII. But to write that programmatically I need a way to tell the program to break it down similarly. I thought about just working in 10's. For example:

Divide the number by 10, output the number of X's that would result from that. 44 / 10 would be 4.4 and that would be XXXX and then I'd have to deal with the remaining .4.

This seems like a messy way to go and as I can go up to M or 1000, I would probably want to start by dividing by 1000?

I guess critical thinking is not my strength here, and that's partly why I wanted to try and solve the problem. If anyone has some advice that'd be great. I might end up figuring this out through experimentation, but thought I'd ask.
2. Do it the same way you do "display the amount of time elapsed in days, hours, minutes, and seconds as necessary." Keep doing subtraction, starting from the largest value.

So for 23:

23 >10? yes

print X, subtract 10.

13 > 10? yes

print X, subtract 10.

3 > 10? no

3 > 5? no

print III

Now, you have to figure out what to do for IV and VX and whatever. You can post-process a string, turning IIII into IV, or you can have a special case for "one unit of this less than the amount of one unit up from this"
3. I tried to do this, and then got distracted by work. You have to also note that the rules are contradictory. IX is 9, meaning 10-1. However, 99 is NOT IC, like you'd think, it's XCIX. But then 45 is VL. So good luck. Roman->arabic is much easier than arabic->roman.
4. Haha, work can be distracting. Thank you for the tip, I'll go with the subtraction and post-processing, something I tend to forget about when I work. I think as long as I can make my way through this part, I can do the rest, I just needed a different perspective.

Yeah, Roman->Arabic is way easier, I was doing both conversions at the beginning than got stuck here.
5. The inconsistent rules is why I gave up. Once I realized "99" is not represented the same as "9" and "49" I just said screw it and deleted what I had (which wasn't right anyway)
6. Yeah, seeing as in the story it was a way to see how new hires think and work and in my case just for fun, I'm not going to lose sleep over it if I can't get it. At the very least I got more familiar with python syntax in the process.