mirror of
https://github.com/rjNemo/exercism-elixir
synced 2026-06-06 02:16:48 +00:00
2.5 KiB
2.5 KiB
Hints
General
- Read about IO in the Getting Started guide.
- Read about debugging with
IO.inspect/2in the Getting Started guide. - Read about the
IOmodule in the documentation.
1. Welcome the new player
- There is a built-in function that writes a string to the standard output.
2. Ask for the character's name
- There is a built-in function that reads a string from the standard output. It can also wrote a prompt, so there is no need to use a separate function to write the question.
- There is a build-in function in the
Stringmodule that can remove trailing and leading whitespace from the input.
3. Ask for the character's class
- There is a built-in function that reads a string from the standard output. It can also wrote a prompt, so there is no need to use a separate function to write the question.
- There is a build-in function in the
Stringmodule that can remove trailing and leading whitespace from the input.
4. Ask for the character's level
- There is a built-in function that reads a string from the standard output. It can also wrote a prompt, so there is no need to use a separate function to write the question.
- There is a build-in function in the
Stringmodule that can remove trailing and leading whitespace from the input. - There is a build-in function in the
Stringmodule that can convert a string to an integer.
5. Combine previous steps into one
- Reuse functions implemented in previous steps.
- There is a built-in function, useful for debugging, that can write to the standard output more than just strings. That functions accepts options, for example a string that will be written before the passed value.