[Community Puzzle] Mandelbrot Set Approximation

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @StepBack13,validated by @_O-MEGA,@_yel_p and @Saphir123.
If you have any issues, feel free to ping them.

Maybe there is something I didn’t understand, but the statement says that the number of column is 1.5*(n-1).
In the 1st test case, n=7, so I guess the number of column is 9. But the expected output seems to be with 10 columns.

Did I miss something ?

yes, it seems the test cases have 1.5*(n-1)+1 columns. That should be fixed.

z(20) ≈ [9.263696725417487e+35,-2.9948397573321135e+35]
|z(20)| ≈ 9.735766132801658e+35 ← definitely not in the set

Why the statement includes an example of z(20) and why it uses z(20) to determine whether the number is “in the set”? Wasn’t z(10) ought to be used instead?

This statement is not clear at all, it took me a while to understand what was the c parameter.

Why change a,b to x,y on the second part of the statement, if it is the same thing ? :dotted_line_face:

I might be the stupidest guy around, but it would be nice if you add somewhere what is the absolute value of an imaginary number, as you did for the square value of an imaginary number.

Thanks for spotting this! I’ve fixed it now. It was from an earlier draft where I asked for 20 iterations.

1 Like

That’s a good point. Sorry for the confusion. I’ve changed all [a,b]->[x,y] for clarity.

I’ve also added a note at the bottom now explaining that the absolute value of a complex number is √(x^2+y^2).

1 Like

Yes, this has been fixed now, sorry about that. 1.5*(n-1)+1 columns