• I tried several solutions and amongst them your solution; all passed fine "TESTS" and "ATTEMPT". I don't understand why you got that and I am unable to reproduce it. Save your solution, "RESET" the page try again.

  • I've changed it to def convert_fract(lst) copied verbtim from you snippet it's still producing

    #<NoMethodError: undefined method expect' for main:Object Did you mean? exec> main.rb:15:in block (2 levels) in '
    /runner/frameworks/ruby/cw-2.rb:180:in wrap_error' /runner/frameworks/ruby/cw-2.rb:72:in it'
    /runner/frameworks/ruby/cw-2.rb:206:in it' main.rb:14:in block in '
    /runner/frameworks/ruby/cw-2.rb:55:in block in describe' /runner/frameworks/ruby/cw-2.rb:46:in measure'
    /runner/frameworks/ruby/cw-2.rb:51:in describe' /runner/frameworks/ruby/cw-2.rb:202:in describe'
    main.rb:13:in `'

    When going through ATTEMPT!

  • The template solution is:

    def convert_fracts(lst)
      # your code
    end
    

    Function name in your solution is not the good one. Your solution is passing "ATTEMPT".

  • Issue with test for the attempt with ruby returning this in the logs #<NoMethodError: undefined method `expect' for main:Object
    Did you mean? exec>

    unable to complete kata because of this

  • I see, I had thought the instructions would be specific to the chosen language. Thank you.

  • I see the list of tuple response type in the Example section in the instructions:
    Example:
    convertFracs [(1, 2), (1, 3), (1, 4)] shouldBe [(6, 12), (4, 12), (3, 12)]

    This example is not said to be specific to Python: the kata contains 34 languages.

  • (sorry, my first comments and getting used to the interface)

    Thanks for the clarification on the function name.

    I see the list of tuple response type in the Example section in the instructions:
    Example:
    convertFracs [(1, 2), (1, 3), (1, 4)] shouldBe [(6, 12), (4, 12), (3, 12)]

  • For Python, the instructions indicate the return type should be a list of tuples.

    Where do you see that?

    Also the name of the function is different in the instructions (convertFracs) versus the tests (convert_fracts).

    Both names are accepted. See "Sample Tests" with "try:" block.

  • For Python, the instructions indicate the return type should be a list of tuples.
    convertFracs [(1, 2), (1, 3), (1, 4)] shouldBe [(6, 12), (4, 12), (3, 12)]

    But the tests expect the return type to be a list of lists.

    Also the name of the function is different in the instructions (convertFracs) versus the tests (convert_fracts).

  • Read the note in the description. There is an open issue below too.

  • There is an issue in test with this (30,60)(48,60)(45,60)(40,60)(42,60)

    lst = [ [1, 2], [4, 5], [3, 4], [6, 9], [7, 10] ];
    testing(lst, "(30,60)(48,60)(45,60)(40,60)(42,60)");

        the common denominator is 180 not 60
    
  • Is still there...

  • @searchingforapuppy

    I think you are misinterpreting the logs. In this particular kata the assertions are not separated, therefore the error message you see (false should equal true) does not necesarily refer to the first test; i.e. your solution might work for the first few tests until it reaches a case for which it does not work.

  • I'm not sure, but maybe the TypeScript test is broken.

    I'm working with this problem with TypeScript, and I failed a test within tests below.
    I tested them, and it seems I failed the first case.

    The error message say that "expected false to equal true", so the first case is expected to return false, and my program returns true for this case.
    Although, the first case is given as valid case at the Instruction page.

    Basic tests
    Log
    [121, 144, 19, 161, 19, 144, 19,  11] [121, 14641, 20736, 361, 25921, 361,20736, 361]
    
    [ 3, 4 ] [ 0, 25 ]
    
    [ 121, 144, 19, 161, 19, 144, 19,  11] [ 231, 14641, 20736, 361, 25921, 361, 20736, 361]
    
    [ 121, 144, 19, 161, 19, 144, 19,  11] [ 121, 14641, 20736, 36100, 25921, 361, 20736, 361]
    
    [] []
    expected false to equal true
    
  • No, they're not broken.

  • Loading more items...