Cut and Pasted Solution Generating Error: "Variable time_linear does not have the expected value."

Bug.

There doesn’t seem to be any errors when running DQ’s solution. It could have been a temporary issue when you tried to run it, so I would recommend just refreshing the page and trying again after some time.

I have the same problem and my solution is exactly what the DQ solution says. It seems the code is checking for a specific range of values with time_linear, however, that’s going to be dependent on the system executing the code. I’m going to give it a while and try again, but there’s clearly something off with the evaluation code.

Edit: FWIW, I tried an hour later and still have the same problem. Using a copy/paste of the solution code still results in the same error.

Second Edit: It did eventually work. I’m guessing it was waiting on the time for the linear search to pass 1.0 seconds, which only happened after a dozen or so tries.

I’m experiencing this error right now even using the provided solution; I have refreshed, cleared code, cleared cache.

Response is: Variable time_linear does not have the expected value.

My output is always along the lines of this with minor changes to each value:

linear, 0.7268922328948975
binary, 0.021103382110595703

I guess I’ll wait until the time for linear is greater than 1?

Edit #1: about 5 hours post, several tries with a persisting error. Still not getting to 1 on it’s own.

Last edit: I have run this several times a day now and the value necessary for linear is never greater than .9 something.

Same problem here. Cutting and pasting the answer made no difference.
In the end the only way I could complete this one was by using the DQ_… variable :slight_smile: