-
-
Notifications
You must be signed in to change notification settings - Fork 42
London|25-SDC-NOV| FATMA DEGIRMENCI | Sprint 4|Implement cowsay #290
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
base: main
Are you sure you want to change the base?
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start. I have left some comments. Also, can you include a requirements file so I know which library you intend to use?
implement-cowsay/cow.py
Outdated
| if animal not in animals: | ||
| print(f"Invalid animal. Supported animals are: {', '.join(animals)}") | ||
| exit(1) | ||
| cowsay.char_funcs[animal](args.text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if I give my arguments as plain text, without quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback
I’ve updated the script to support multi-word text without quotes by using (nargs="+") for the text argument.
implement-cowsay/cow.py
Outdated
|
|
||
| parser = argparse.ArgumentParser(description="implement Cowsay command") | ||
| parser.add_argument("text", help="Text to be displayed") | ||
| parser.add_argument("--animal", help="Animal to say the text", default="cow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you get the help to show the list of possible animals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback. I’ve added a list of all cowsay animals to the help output so can see the available options.
|
Great, this is almost complete. Can you check my earlier comment about requirements? |
Self checklist