Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Random Python tests does not always guarantee a test case such as

    iso_gram_test = "isogram"
    iso_gram_test += isogram_test + isogram_test[-1]
    
    
  • Description and title updated

  • Added random tests

  • This is an approved kata... Stop spamming issues, you clearly don't understand what you're doing.

  • https://www.codewars.com/kata/isograms/javascript

    This is a duplicate. Too classical too.

  • This should probably include an explicit test which checks for the solution's precision. I tried submitting a solution with 2 decimal digit precision and it passed all random tests on the 4th try.

  • The golden ratio is transcendental? The golden ratio is (1+sqrt(5))/2

  • I'm somewhat conflicted on this. At the very least, I think the spec needs to be improved.

    A ratio has a directionality. "Return True if the ratio of the longer side to the shorter side of a rectangle is equal to the golden ratio." I've never seen the current phrasing used in a mathematical context and I doubt I ever will.

    I also don't really like the counterargument that we can rotate the rectangle 90 degrees. Are x,y coordinates, vectors, or what here? Transforming inputs to achieve some unclearly specced goal feels sleezy to me.

    Finally, I think it ought to apply to more than just the sides of rectangles, but as written we can't really answer the question for apples and oranges, because apples:oranges != oranges:apples except where apples:oranges == 1.

    If it has to be kept without directionality, a phrasing along the lines of "Return True if the golden ratio exists amongst the set of ratios {a:b; a, b E sides_of_rectangle}" would be greatly appreciated.

  • Well, the description talks about the sides of a rectangle, so in my understanding the ratio can be either x/y or y/x. In other words: if I turn a rectangle (which has the golden ratio) 90 degrees, will it lose its golden ratio? No.

    My python translation is built that way, although the ruby version (which I used as a base) does not.

  • But can y/x=phi ?!?

  • Should be clear now.

  • It may be good enough for 7-8 kyu

  • Oh, I think it can be fixed. But the kata as a whole needs a rethink and not just a bandaid ( haven't seen your translation Anter, not implying it is ).

    The specs themselves might need to be rewritten.

  • (it rather needs to be unpublished, imo... well...)

  • Loading more items...