Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update task.md #204

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions AlmostDone/NullSafety/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Let's implement a function to interact with the user.
### Task

Implement the `chooseFilter` function, which asks the user to choose
a filter (`borders` or `squared`, the full text is `Please choose the filter: 'borders' or 'squared'.`)
and returns it.
a filter, either `borders` or `squared`. The full text of the prompt is `Please choose the filter: 'borders' or 'squared'.`
The function should then return the chosen filter.

<div class="hint" title="Click me to see the signature of the chooseFilter function">

Expand All @@ -14,8 +14,8 @@ fun chooseFilter(): String
```
</div>

This function has to use the `safeReadLine` function.
If the user inputs an incorrect filter name, the function should ask to input the right one `Please input 'borders' or 'squared'`:
This function must use the `safeReadLine` function.
If the user inputs an incorrect filter name, the function should prompt the user again with `Please input 'borders' or 'squared'` to ensure the correct filter is entered:

![`chooseFilter` function work](../../utils/src/main/resources/images/part1/almost.done/choose_filter.gif "`chooseFilter` function work")

Expand Down
Loading