#stuck on Mixed Juices

49 messages · Page 1 of 1 (latest)

violet axle
#

This is my code. Idk why it's do that. And the error isnt very clear

#

and the test which send an error

#

I've a lot of random errors like that

#

Is there something that i didnt understand ?

#

And sorry for my bad english

wraith edge
#

Take a close look at the return statement for the 'Green Garden' case.
There's one odd character in that line.
Does that help?

violet axle
#

odd character ?

#

Sorry i dont understand

#

Google says that odd is impair in my language

wraith edge
#

Compare these two lines:

       return 1,5;
       return 1.5;

There's a tiny difference.

violet axle
#

oh

#

point

#

and

#

,

wraith edge
#

correct.

violet axle
#

THANKS

#

Too tired

#

will see tomorrow

wraith edge
#

and with "odd" I meant "strange" or "out of place".
(I'm not a native English speaker either 🙂

violet axle
#

and this time ...

#

This is my code

#

and i really dont see what it's the problem

#

my WHile loop is infinite

#

but lemons[0] =

wraith edge
#

take a look at the penultimate line:

limes.shift

Do you see what syntactical element is missing?

violet axle
#

()

#

no ?

wraith edge
#

correct. (but I stopped reading after that, so there might be more issues)

violet axle
#

Okay

#

But why there is thing with () and other with nothing like .length

#

AH

#

Understood

#

Length is a property no ?

#

And shift a method

#

uh

wraith edge
#

when will the condition of the loop become false?

violet axle
#

when

#

...

#

we cut enough lemon slice

wraith edge
#
while (wedgesNeeded != 0)

Will wedgesNeeded ever become 0?

violet axle
#

No

#

I modified it

wraith edge
#

Sorry, I asked the wrong question.
The loop ends when and only when wedgesNeeded becomes 0.
But what if it gets negative? What if there are not enough limes?

violet axle
#

i added wedgesNeeded > 0

#

and