diff --git a/Hangman/isCompleteFunction/task.md b/Hangman/isCompleteFunction/task.md index 2d250e4b..d39ff777 100644 --- a/Hangman/isCompleteFunction/task.md +++ b/Hangman/isCompleteFunction/task.md @@ -3,7 +3,7 @@ It's time to practice! Let's start with a simple function. ### Task Implement the `isComplete` function, which accepts two string arguments - `secret` and `currentGuess`, -and checks if the game is complete. The game is complete only if `secret` and `currentGuess` equal. +and checks if the game is complete. The game is complete only if `secret` and `currentGuess` are equal.
@@ -13,13 +13,13 @@ fun isComplete(secret: String, currentGuess: String): Boolean ```
-**Note**, that `currentGuess` contains spaces between letters. -So, it's not enough just to compare `secret` and `currentGuess`. -You need to remove all spaces from `currentGuess` first. +**Note** that `currentGuess` contains spaces between letters. +Therefore, it's not enough to merely compare `secret` and `currentGuess`. +You'll need to remove all spaces from `currentGuess` first. -You can also use the already defined variable `separator` that stores a space: +You can also use the already defined variable `separator`, which stores a space: ```kotlin -println("It is the value from the separator variable: $separator.") // It is the value from the separator variable: . +println("This is the value from the separator variable: $separator.") // This is the value from the separator variable: . ``` If you have any difficulties, **hints will help you solve this task**. @@ -28,7 +28,7 @@ If you have any difficulties, **hints will help you solve this task**. ### Hints -
+
Here are several examples of the _isComplete_ function's work: @@ -37,11 +37,11 @@ Here are several examples of the _isComplete_ function's work: - secret = "ABC", currentGuess = "A A A", result = false;
-
+
-The easiest way to replace `separator` in `currentGuess` is to use the built-in function [`replace`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/replace.html): +The easiest way to remove `separator` in `currentGuess` is to use the built-in function [`replace`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/replace.html): ```kotlin println("aabbccdd".replace("a", "e")) // eebbccdd ``` -In this task you can just replace `separator` with an empty string `"""`. +In this task, you can just replace `separator` with an empty string `"""`.