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

    I retrained on this kata and copy/pasted this solution. It doesn't work unless I put the boolean values in quotes.

  • Custom User Avatar

    Thanks for suggestion of davidrgreen.

    Thanks Javatlacati fixed the problem when I sleeping ;-)

  • Custom User Avatar

    for wich language? description shows slightly different for every programming language.

  • Custom User Avatar

    Sure thing. Marking as resolved. Only minor thing is that under Behavior one of the black boxes showing str is stretching the entire width of the description, making it look a little odd, but maybe that's a limitation of markdown. Anyways, keep up the good work.

  • Custom User Avatar

    I think it's done can you verify and if is the case mark the issue as solved? :)

  • Custom User Avatar

    Cool. I appreciate the quick response. And the issues are rather minor, especially considering English isn't your native language. Below are other changes I'd suggest making. I'm a native speaker, but I'm sure my English isn't perfect, so feel free to accept or reject any of the suggestions.

    Line 1:

    • "similar work, loop statement is a good choice" -> "similar work, a loop statement is a good choice".

    Line 2:

    • "the code became:" -> "the code becomes:"

    Comments in third code example:

    • "//Initialize two variable sum and num" -> "//Initialize two variables: sum and num"
    • "Each time sum will add the current value of the num" -> "Each time num will be added to the current value of sum"
    • "Each time the value of num increased by 1" -> "Each time the value of num increases by 1"

    Line after third code example:

    • "variant of while, the example" -> variant of while. The example"

    Line after fourth code example:

    • "Their difference is, while judges condition before perform code execution, do..while judges condition after code run one time." -> "The difference is that while judges the condition before code execution, and do...while judges the condition after the code executes at least one time."

    Two lines down:

    • "Ok, lesson is over, let us do some task with while" -> "Ok, the lesson is over. Let us do some tasks with while."

    Task:

    Your task is to create a function, padIt, that has two parameters:

    1. str - a string representing the string to pad.
    2. n - a number representing how many times to pad the string.

    Behavior of the function:

    You need to write a loop statement within the function that loops n times. Each time through the loop it will add one "*" to str, alternating on which side it is padded: the first time will add a "*" to the left side of str, the second time will add a "*" to the right side, and so on.

    Finally, return the padded string.

  • Custom User Avatar

    Please check again.
    Sorry just collaborated yesterday and didn't read all the description, please let me know if anything is still hard to understand. The creator of this Kata and me aren't remotely native speakers so please don't hesitate on going deep with language suggestions, this can make us more profficient at communicating :)

  • Custom User Avatar

    There are minor issues with the English, primarily the use of verb tense. For instance, "the example above can write like this:" should have been "the example above can be written like this:" The kata itself is a good one for beginners. It's just a little jarring reading through the text.