Skip to content
Open
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions implement-cowsay/cow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

import argparse
import cowsay
Copy link

@DaryaShirokova DaryaShirokova Aug 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is external dependency, it should be declared somewhere (could be requirements.txt file).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added requirements.txt for cowsay.


parser = argparse.ArgumentParser(
prog="cowsay",
description="Make animals say things",
)
parser.add_argument("--animal", default="cow", help="The animal to be saying things.", choices=cowsay.char_names)
parser.add_argument("message", nargs="+", help="The message to say.")
args = parser.parse_args()

cowsay.char_funcs[args.animal](" ".join(args.message))
Loading