Ad
  • Custom User Avatar

    I think I did it the complex way, lol. But.. mine could easily be modified to work for any rotation of rectangle and any length of sides and it should still work. So there's that.

  • Custom User Avatar

    Thanks mate for your reply!
    I was:
    using namespace std;
    so namespace resolution shouldn't have caused problems, I guess it was just some bug in the interface at that time, it worked ok in the days later.
    And I know that "using namespace" is frowned upon by some, but I'm here just for fun, not production code ;)

  • Custom User Avatar
    std::cerr << "error message" << std::endl;
    
  • Custom User Avatar

    -edit-
    Nevermind, solved.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I could not agree more. The description does not make any of these details clear.

  • Custom User Avatar

    I did more than stare at it. I printed out the example image and drew all over it, including tons of formulas and lines. I was in the middle of finding a really complex way at solving it when it hit me how simple it was.

  • Custom User Avatar
  • Custom User Avatar

    and still, after a while I decided to check the test cases... hmmmm.... I wonder what is wrong with this statement:
    Test.assert_equals(abs(len(primes)-len(sol_primes)<3),True)?
    Maybe the fact that it returns the absolute value of ( len(primes) - len(sol_primes) < 3 )
    :))

  • Custom User Avatar

    I'll be honest, the big challenge in solving this kata (Python version at least) was to figure out what the author intended to have for the length of primes[]. I happen to know a few things about primes, but this kata got me confused. I don't even know why I passed, and I won't try to figure it out.

  • Custom User Avatar

    I apolodgize I wasn't more explicit in raising the issue.
    It refers to the Python version of the Kata. I've checkcked and it seems that it still needs the hack in order to pass

  • Custom User Avatar

    It appears the issue has been fixed because I did not need to hack my code to get around any tests.

    Edit: Unless you are talking about a different language than JS?

  • Custom User Avatar

    "I know kungfu!"
    Nah, I don't, and I'm far from mastering Python metaprograming, but what a great kata to get me started on the subject!
    Thanks Dundee!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thank you Zirgion! Great Kata, I really enjoyed solving it! I will try to refactor the code at some point given that in current version I kept adding patches as I was hiting initially unforseen problems. Didn't realise how many things one needs to keep track of, while playing chess :)

  • Loading more items...