diff --git a/implement-cowsay/cow.py b/implement-cowsay/cow.py new file mode 100644 index 00000000..2d5b8328 --- /dev/null +++ b/implement-cowsay/cow.py @@ -0,0 +1,26 @@ +import cowsay +import argparse + +parser = argparse.ArgumentParser(description= "animals talking gibberish") + +parser.add_argument( + + "--animal", + choices=cowsay.char_names, + help="an animal is talking" +) + +parser.add_argument( + "message", + nargs="+", + help="msg to say" +) + +args = parser.parse_args() + +text = " ".join(args.message) + +animal = args.animal or "cow" + +output = cowsay.get_output_string(animal, text) +print(output) \ No newline at end of file