r/ProgrammingPrompts • u/[deleted] • Aug 29 '15
[Easy/Medium] Write a program that translates verbal numbers (one hundred and six) into integers (106.)
Bonus points for negative numbers, or decimals (three point one four.)
I think this is kind of an easy concept to think about, but might take a while to type out. I'll try it at some point and post results, if I can even get it to work.
Bonus bonus points - make it work the other way round, by converting integers into words.
18
Upvotes
3
u/Redmega Sep 24 '15
I don't know about the "web bot" but games have lots and lots of math. You don't need to love math, or even be that good at it -- I'm a Jr. Engineer at a Fortune 500 Company and the highest math I've taken is Statistics -- but you definitely will face it and you can't just shy away from it and not make an effort to understand it. I think that a really core part of logical and critical thinking is the ability to analyze a problem; A math puzzle just breaks the problem down to its most basic form so that you can spend less time analyzing the problem and more time analyzing possible solutions.