Ad
  • Custom User Avatar

    Please provide clearer and more insightful suggestions on how to reword that part / add specific examples ?

  • Custom User Avatar

    it always says that the output should be always 4

    Where do you read that? Not a kata issue.

    She always says, "x years old", where x is a random number between 0 and 9. Assume the test input string is always a valid string. For example, the test input may be "1 year old" or "5 years old". The first character in the string is always a number.

    That's what it says, I guess you were not using the string passed to the function and generating a random number yourself and then failing the only sample test there was, because it expected 4 as answer. I've added 2 more sample tests.

  • Custom User Avatar

    If it is 0 and you multiply it, what do you get?

  • Custom User Avatar

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