Ad
  • 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.

  • Custom User Avatar
  • Custom User Avatar

    Thanks for your work!

    I modified the Description in the section on the example, adding the coffeescript examples show, but I am not familiar with the coffeescript, please check whether it is correct, thank you!

    If there is a mistake, please reply to me or directly modify

    In addition, please check the translation of #7.

  • Custom User Avatar

    Dear metalbroadcast:

    About your ideas, I think there is no maneuverability. First of all, there is no way to test the infinite loop, because if the user's code has an infinite loop, the only result is to run more than 6000 ms and thus lead to failure. Secondly, for a beginner's Kata, providing the right parameters is the author's obligation. If you intentionally provide some invalid parameters to the beginner, they may not have enough ability to distinguish.

    Cheers!

  • Custom User Avatar

    Coffeescript translation Kumited! please accept :D

  • Default User Avatar

    -Validation against parameters values of function.
    -Validation against an infinite loop.