Your first task is a warm-up exercise designed to give you a feel for the challenge-solving process. It won’t require any significant mental effort, so just relax and enjoy the experience.
Acceptance Criteria
There’s only one acceptance criterion for this task to pass. Your goal is to make the custom wordcount
command available in the terminal. Even though it won’t do anything useful at the moment, it should return successfully with a zero exit status code, indicating no errors, and without showing any output.
Note: If you’re solving the challenge on a local computer rather than in GitHub Codespaces, then don’t forget to run the wordcount
and pytest
commands from within an activated virtual environment where you’ve installed your Python project!
On Unix-like operating systems, such as macOS and Linux, you can check the last command’s exit status by echoing the special pseudo-variable ($?
) in the shell:
(venv) $ wordcount
(venv) $ echo $?
0
In this case, the wordcount
command returns successfully. Otherwise, a non-zero value would typically indicate some kind of error.
Additional Resources
For further clarification or guidance, you can explore these resources:
- Defining Your Own Python Function
- The Terminal: First Steps and Useful Commands
- The
pass
Statement: How to Do Nothing in Python - Using the Terminal on Linux
- Writing Comments in Python (Guide)
- Writing Comments in Python
If you still need more clarity, then move on to the next lesson, where you’ll find a walkthrough of a sample solution with a discussion of the suggested Python tools.
What’s Next?
🕵️♂️ Continue to the next lesson to review the sample solution and compare your approach to solving this task.