Ad
  • Custom User Avatar

    I see you ran afoul of the t-rex, as well.

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks!

  • Custom User Avatar

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

  • Custom User Avatar

    I've been playing with the @property and @x.setter decorators recently in some of my code for work. It's not a comprehensive list, but I think I could write a kata to introduce the topic and demonstrate their use. I'll take a look tomorrow.

  • Custom User Avatar

    Is there a reason you wrote a custom test function for your submission test cases, as opposed to using the built-in Test.assert_equals(value, expected, message) format? I rewrote the test battery in the kumite I just submitted to the kata - would that be a better option for testing?

  • Custom User Avatar

    For the Python version, having the examples from the description translated to test cases would really be of benefit, unless part of the goal of the exercise is to write your own test cases for the code, in which case I kinda feel like that should be explicitly mentioned in the description. Here are the test cases that match the description examples, in case it helps:

    Test.assert_equals(title_case('a clash of KINGS', 'a an the of'), 'A Clash of Kings')
    Test.assert_equals(title_case('THE WIND IN THE WILLOWS', 'The In'), 'The Wind in the Willows')
    Test.assert_equals(title_case('the quick brown fox'), 'The Quick Brown Fox')
    
  • Custom User Avatar

    I had honestly never run across the capitalize() method previously. That would eliminate the list(map()) in here.

  • Custom User Avatar

    Did not know about that method. Thanks!

  • Custom User Avatar

    This was fun! I'd never looked at ZMQ before, and I'm intrigued. The description gives pretty big hints as to what methods to use, but I still wound up having to look things up to verify that I was understanding the data flow correctly.

    I did notice that the comment in the starting code block doesn't match the description or test cases.

        # REPly to the request with "One <<specified beverage>> coming up!"
    

    There should be a comma after <<specified beverage>>.

  • Custom User Avatar

    A pretty good fundamentals kata, with a simple solution that it's really easy to overthink (especially if you've just started learning).

    I'd recommend including at least a couple of pre-submit test cases, for folks who are working on the fundamentals, and want to see the call with arguments while finding their solution. These are the ones I added when I built mine, if you want to use them:

    Test.assert_equals(nthterm(1, 2, 3), 7)
    Test.assert_equals(nthterm(2, 2, 2), 6)
    Test.assert_equals(nthterm(-50, 10, 20), 150)
    

    The description also seems to be a bit wordy. Something as simple as this might provide the necessary clarity without confusion:

    An arithmetic sequence is one in which f(n) = f(n-1) + c, where c is a constant value. Your job is to write a function, nthterm(), that calculates and returns the nth value in an arithmetic sequence when presented with three arguments:

    • first, the value of f(0)
    • n, the index of the desired number in the sequence, and
    • c, the constant value referred to in the formula above
  • Custom User Avatar

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

  • Custom User Avatar

    When points reset due to lives dropping below 0, should other values (level, lives, ghost counts, ball counts, etc) reset, as well? That would seem to make sense, if I were designing an actual game from this, but isn't covered in the description.

  • Custom User Avatar

    I'd say that the description needs further clarification (see questions posted separately), and that test cases (at least for Python) need a lot of work. I started a kumite that, among other changes, adds meaningful feedback messages to the Python test cases, which may help.

  • Custom User Avatar

    Thanks!

  • Loading more items...