Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #72.8K
~3K People Reached
Favorite Forums
Favorite Tags

1 Posted Topic

Member Avatar for vegaseat

A quick solution that does both directions: [code=python] # Roman Numerals # 2010-06-15, Eljakim Schrijvers mapping = [ ('cd','cccc'), ('xl','xxxx'),('iv','iiii'),('d','ccccc'),('l','xxxxx'),('v','iiiii'), ('cm','ccccccccc'), ('xc','xxxxxxxxx'),('ix','iiiiiiiii')] mapping.reverse() bignums = [ ('m',1000), ('c',100), ('x', 10), ('i',1) ] def fromroman(x): for (kort, lang) in mapping: x= x.replace(kort, lang) x = '+'.join(list(x)) for (karakter, waarde) in bignums: …

Member Avatar for eljakim
0
3K

The End.