Ad
  • Custom User Avatar
    • Having multiple output types is bad
    • Input validation is a worthless requirement
    • No fixed tests
    • Too many random tests
    • I'm pretty sure this is a duplicate
  • Custom User Avatar

    Tests are broken.

  • Custom User Avatar

    Which point is at the beginning of the list? Why not beginning and finishing list at the simpler and fixed point (1, 0)?
    Does answer go clockwise or counter-clockwise?

    Also CW is a coding website, not a math website: give the formula.
    At the moment, even maths don't help: drawing circle is very far from unit circle and roots of unity.

  • Custom User Avatar

    Rounding prevents correct float comparision. Two almost equal numbers can be rounded to different values.

    Floats must be computed with maximum precision and compared with test.assert_approx_equals or math.isclose.

  • Custom User Avatar

    In python names should be snake_case (like de_moivre_number)

  • Custom User Avatar

    Okay so

    • The idea is quite nice.
    • The description needs to be way shorter and more clear
    • As for the z^n = 1 you could make it z^n = m and have that as a variable too
    • The returning of a list of tuples is fine but to test it you have to have exactly the right order which is not important with regards to the point of the kata. You could sort the list from the user before you check it but IMO you should just ask for a set of complex numbers: {z1, z2, z3...}. Sets are unordered and duplicate free so I think you can just test for equality.
    • Also why do you need the first point twice?
    • Instead of that random turtle code, I'd make a diagram, upload it to imgur, and then embed it in the description.

    Sadly I think it would be a stretch to get this through beta because it requires some extra maths stuff and so less people will complete it so your rating might not go up enough.

    If you want to implement any of the above and don't know how let me know 🙃

    Edit: I didn't see the new description - it's much better now but needs a bit of maths about de moivre in it.

  • Custom User Avatar

    no random tests