Ad
  • Custom User Avatar

    Well, just tried it in Python and it was super easy.

  • Custom User Avatar

    I'm trying to learn Java and came across this kata. I was daunted by the syntax in the problem which I had never seen before. But I sat down, looked up the unknowns bit by bit, trying to understand what the problem was asking and how I might solve it.

    Despite my best efforts I couldn't get anywhere close. Not just a bad solution, or a partial one, I simply couldn't write an answer which even ran. I know a little bit more about Function, lambda, and generics, but my confidence kinda took a hit.

    Maybe this kata is totally misranked and should be much higher, or it just needs more explanation, or I'm a complete idiot. It could be the latter, I'm willing to admit that, but it feels like something is off with this kata.

  • Custom User Avatar

    Don't know why I didn't expect math to have a hypotenuse function. Should read the documentation.

  • Custom User Avatar

    My solution was similar to this one, but it shows the value of experience with the extras which they used:

    1. Using an * to unpack the tuple generated by divmod.
    2. Using the quotient operator to lose decimal places of a float (rather than casting to int).

    I'm glad I got close, but even gladder I could reference this answer to learn a little more.

    Thanks.