Ad
  • Custom User Avatar

    This is causing the test to fail regardless of the learner's code.

    No, there is a way to make your code accept no argument.

  • Custom User Avatar

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

  • Custom User Avatar

    Approved.

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    You need to make your code work when called like hello("bob") or when it's just called as hello(). You should be able to call your function with either 1 or 0 arguments. Your code only works when it is called with 1 argument.

  • Custom User Avatar

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

  • Custom User Avatar

    Wow i'm stupid

  • Custom User Avatar

    No, why? Making it to work when called as hello() is one of requirements of this task.

  • Custom User Avatar

    In the test case

    test.assert_equals(hello(), "Hello, World!")

    should maybe change to

    test.assert_equals(hello(inp), "Hello, World!")

    maybe?

  • Custom User Avatar

    100 years later, I was still staring at the monitor waiting for the kata to be approved, as cars flew by outside the window, the second technological revolution took place on Mars.

  • Custom User Avatar

    Can you explain to me more clearly what is happening?

    In example tests, there is a test case which looks like this: Assert.That(Kata.Hello(), Is.EqualTo("Hello, World!"));. Notice how Hello() is called without any argument passed in. You have to write your solution in a way which allows it. It should work for both forms: Kata.Hello(someName), and Kata.Hello().

  • Custom User Avatar

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

  • Custom User Avatar

    You'd have to add something to the description along the lines of "In this kata, you are expected to write a function which can take either zero or one parameters." Even then, people tend to be bad about reading the description. I think the main problem is that this kata is introducing a concept that seems to be new to newer programmers, but it's not explicitly calling out what that concept is. A lot of people solving the kata aren't even aware that what it's asking for is even possible, so it doesn't register to them as "this is something I can control". Another idea might be to have the tests catch the exception and print out a more user friendly error message that says something like "Your function doesn't work when called with no arguments." A lot of people reporting this as an issue seem to have a problem comprehending error messages. At the same time, that's a skill they should be working on, it's not really reasonable to expect kata authors to have to do that just because a lot of solvers lack a basic programming skill.

  • Custom User Avatar

    This is not exactly what I wanted to ask. I would be interested to know what to change in the kata (in the description or in examples or something) so users will see their errors as their mistake, and not as a bug with the kata.

    For example what made you think that the kata is buggy? What would help you see your mistake?

  • Loading more items...