West Midlands | 26 March SDC | Iswat Bello | Sprint 4 | implement cowsay#495
West Midlands | 26 March SDC | Iswat Bello | Sprint 4 | implement cowsay#495Iswanna wants to merge 3 commits into
Conversation
- Add .venv to ignore Python virtual environments - Add *.class to ignore Java compiled class files
- Create cow.py with argparse for command-line argument parsing - Support dynamic animal selection with --animal flag (defaults to "cow") - Accept message as positional arguments and join them - Use getattr() to dynamically call animal functions from cowsay library - Fetch available animals from cowsay.CHARS instead of hardcoding - Add requirements.txt with cowsay dependency
|
This implementation looks good to me and it works as expected. |
Thank you for the review @behnamkvl. Please, I would like to ask if this PR is okay to have the complete label? |
Hi @Iswanna, yes please proceed with closing the PR. |
Thank you @behnamkvl. |
|
Closing PR because the SDC run has finished. Feel free to re-open if you're still working on it. |
Learners, PR Template
Self checklist
Changelist
Pull Request Summary
In this Pull request, I Implemented a command-line cowsay tool in Python that allows users to make animals say custom messages.
Changes
cow.py: New Python script using
argparsefor command-line argument parsingcowsaylibrary--animalflag to select which animal speaks (defaults to "cow")getattr()to dynamically call the appropriate animal functionrequirements.txt: Added
cowsaydependencyFeatures
--helpflag--animalspecifiedUsage Examples
python3 cow.py Grass, delicious. python3 cow.py --animal turtle Fish are cool! python3 cow.py --help