Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored Dec 15, 2023
1 parent 58db8c8 commit 95d4dba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions MastermindAdvanced/errorHandling/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ Well, it looks like the game is ready! But what else is left to do?

### 1. Why do we need to inform the user about problems?

When writing programs, it is essential to consider _possible_ behaviour
scenarios and process them. For example, in the current version of the game,
When writing programs, it is essential to consider _possible_ behavior
scenarios and adequately handle them. For example, in the current version of the game,
the user may enter a word that does not match the current game parameters
(the alphabet, word length, and so on), and if so, it is necessary to process
the case and inform the user about the problem.
In this case, the user can fix this problem and continue with the game.
(the alphabet, word length, and so on). In such a case, it would be necessary to process
the situation and inform the user about the problem.
Doing so would allow the user to fix the problem and continue with the game.


### 2. How to simplify the `if` operator

Usually to check several conditions, you need to use the `if` operator with multiple branches.
Usually, to check several conditions, you need to use the `if` operator with multiple branches.
However, if the conditional is used inside a function with `return`,
the `else` word can be omitted:
```kotlin
Expand Down

0 comments on commit 95d4dba

Please sign in to comment.