English-to-Decimal

Add a reply

Posted by mick 594 days ago:
As a followup to Roman-to-Decimal, how about converting English-to-Decimal?

Input: The English representation of any number between zero and ninety-nine.
Output: The corresponding decimal representation of that number.

Examples:
Input: twelve
Output: 12

Input: forty-one
Output: 41

Input: seventeen
Output: 17

Input: zero
Output: 0
Posted by flagitious 594 days ago:
This is a good idea, but almost the exact same challenge has been done in a past perl golf. Would be fun for the other three language users though.
Posted by mick 593 days ago:
This is a good idea, but almost the exact same challenge has been done in a past perl golf. Would be fun for the other three language users though.

Ah, darn. Could you provide a link to the perl golf site that did this? I looked on the Fun with Perl: Perl Golf forum on perlguru.com and I saw one low-graphics site called "Perl Golf (minigolf)" that's on season 3, but I couldn't find the challenge in either of those places. (Although I did see a whole bunch of other neato puzzles, some of which *do* bear a striking resemblence to previous challenges here!)

I've been using this site and the PythonChallenge to help me learn Python, and it's been really fun. I'm not a Perl programmer, so I'm really happy that this site gives me an opportunity to play golf, too.
Posted by flagitious 593 days ago:
http://terje2.frox25.no-ip.org/~golf-info/Book.html

This book has a very comprehensive summary of perl golfs.

Add a reply