The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:First, you have to define in English what determines if a set of characters is a number or not. What, EXACTLY is allowed, and what EXACTLY is NOT allowed. Just writing down 3 or 4 examples may be enough for your brain, but there are a LOT of implicit assumptions there.
Once you decide what the rules are, then you can start coding them. But until you define what the rules are, writing any code is pointless.
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Garrett Rowe wrote:There's no built-in methods that do what you're asking for. There are a few algorithms I could think of to start. Obviously, there some ambiguity in the rules you've given thus far. would DEAD or FADE be parsed as a number or a w
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
SCJP 6.0, willing to find Java job in NZ/AU and move there - LinkedIn profile - Java blog
Paul Clapham wrote:Okay, so if I encountered the string "two billion" then that would be a number? Or are you only interested in numbers rendered as digits? Is there a limit on the number of digits or would a string of 87 digits be a number?
And what about i (the square root of minus one)? Or e (the root of the natural logarithms)? Or pi?
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|