Ad
  • Custom User Avatar

    In many countries, and in higher mathematics, this is standard terminology.
    It is missing a comma, at worst:
    'and a point to evaluate the equation_,_ as an integer.'

    Go check out wolfram math world.

  • Custom User Avatar

    Which IDE? (Which language?)

    • Are you using libraries that you might not have access to here, or that you might need to declare when not using your IDE?
      Have you googled to check which package the method is called from?
    • Can you please name the OS you're running on, in case it's a different kind of bug?
    • Can you please (mark as spoilers) specify which method calls you're using, so that the issue can be verified?

    I probably can't solve your issue myself, but without more information, nobody can.
    Many people have been able to solve this problem both before and since, which means a slightly modified approach may work.

  • Custom User Avatar

    Feels like a cheat, but damn, you can't do this without calculating it with a computer first.

  • Custom User Avatar

    Calling it a bad method is not correct.
    It is a naive method, and not intended to be fast.

    It is a useful attempt, because it works - and for CodeWars, we get to see the more advanced answers, and try to understand how they work.
    These are often written with functions and methods that newer coders do not know exist, or that are difficult to parse.

  • Custom User Avatar

    I'm trained in Electrical Engineering, so plenty of maths, physics, and geometry.

    MonkeyDaFist has addressed most of my concerns.

    • width and depth are equal
    • solving for an ice brick to fit the maximum prism size inside the bottle, not including rim volume

    The image helps greatly, but was less than conspicuous.
    Describing the bottle length as 'total bottle length' would have made it clearer that the narrowed rim section is a part of the bottle length.

    Honestly codewars doesn't always get the best of my attention.

  • Default User Avatar

    Hi, in which field of engineering are you trained? (honest question)

    Also, what improvements could be made to the description? You could offer up a rewrite, thanks.

  • Custom User Avatar

    As a trained teacher and engineer, I object to the wording of the question.

    If English is not your first language, ask for help.

  • Custom User Avatar

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

  • Custom User Avatar

    This is both best practices and clever, and I resent that I am not allowed to vote it up as both.