Another mad person because of Exact Change

Another mad person because of Exact Change
0

#1

Hi everybody,

So I am getting madder and madder about Exact Change.

Can someone explains something ?
I understand my solution should not pass. It is not the exact output listed. But in one case it does not work, and in another case it does work.

Can someone make sense of this ?


#2

The array you’re returning says “TWENTIES” instead of “TWENTY”.


#3

Oh no…

You are right.

Hidding forever.
Thanks for taking a look.


#4

It happens. It’s not actually something you “grow out of” as a developer. In fact, I screw this up so much that if I know I’ll be using a string like that in multiple places, I’ll go out of my way to write out a constant somewhere else so that when I screw that up, I get a very obvious error.


#5

that’s a good tip.
The good news is I read tons of post / articles reading this topic. I was so certain my problem came from the 60.00 v “60.00” v 60 that it completly obsessed me for a few days.

Sometimes you just need someone to take a quick look at your stuff to point you the obvious.
Still, lesson learned.

Stay humble, read and read again


#6

Yup. Pretty much all of my files start with a //STRING CONSTANTS section.