Ad
  • Custom User Avatar

    (10, 2, [9, 6, 7, 4]) comes out to 'days: 1'
    (10, 2, [9, 6, 4, 7]) comes out to 'money: 10'
    To me the use of the word 'consecutive' is confusing. To me 1,2,3,4 (n,n+1,n+2,...) are consecutive numbers. If by consecutive do you mean that the numbers retain the same order as in the list,ie, that they should not be sorted, the I think you should state that the hotels are visited in order as shown by their cost, 9->6->7->4, otherwise I get the impression the hotels can be visited in any order.

  • Custom User Avatar

    To me a poor Kata is one where it takes longer to understand the problem than it does to come up with a solution.

  • Custom User Avatar

    Comments would have been nice, however, this is a great solution in my opinion. Especially when compared to the monstrosity I came up with. I am somewhat of a newbie and I could understand the solution. When I see a solution like this I wonder what my mind does during the process of determining the best way to work this.

  • Custom User Avatar

    x2 + y2 = 126

    There aren't two integer values, x and y, whose sum of their squares (x2 + y2), equals 126.

    How do we show this result? I tried None, [0,0], False, and "False"so far. I must be missing something.

  • Custom User Avatar

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

  • Custom User Avatar

    Fixed my program. Thanks for your help.

  • Custom User Avatar

    Oh, I get it now. The answers aren't necessarily for every language. Okay. Thanks

  • Custom User Avatar

    Sorry, I do not understand your response. I am programming in Python 3.6 and have no idea whether other languages produce answers that aren't 0.
    My results for the initial tests are all correct using Python 3.6 except for the value 7.

  • Custom User Avatar

    Because 7 is already a one-digit number.

  • Custom User Avatar

    Shouldn't 7, since it is one digit (like 4) produce 0 as an answer?

  • Custom User Avatar

    "-": "T",".----.": '"', worked for me "-": "T",".----.": """, did not.