Skip to content

Commit cab4c47

Browse files
authored
Add instructions for implementing cowsay (#11)
This is for sprint 4
1 parent 7836ab7 commit cab4c47

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

implement-cowsay/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Implement cowsay
2+
3+
Your task is to write a command line tool which uses the `cowsay` library to show user-supplied text, as said by a specified animal.
4+
5+
You must use the cowsay library, and you must not write down the list of supported animals yourself - you must fetch this information from the library.
6+
7+
The following command lines should work as demonstrated below:
8+
9+
```console
10+
% python3 cow.py Grass, delicious.
11+
_________________
12+
| Grass, delicious. |
13+
=================
14+
\
15+
\
16+
^__^
17+
(oo)\_______
18+
(__)\ )\/\
19+
||----w |
20+
|| ||
21+
% python3 cow.py --animal turtle Fish are cool!
22+
______________
23+
| Fish are cool! |
24+
==============
25+
\
26+
\
27+
\
28+
\
29+
___-------___
30+
_-~~ ~~-_
31+
_-~ /~-_
32+
/^\__/^\ /~ \ / \
33+
/| O|| O| / \_______________/ \
34+
| |___||__| / / \ \
35+
| \ / / \ \
36+
| (_______) /______/ \_________ \
37+
| / / \ / \
38+
\ \^\\ \ / \ /
39+
\ || \______________/ _-_ //\__//
40+
\ ||------_-~~-_ ------------- \ --/~ ~\ || __/
41+
~-----||====/~ |==================| |/~~~~~
42+
(_(__/ ./ / \_\ \.
43+
(_(___/ \_____)_)
44+
% python3 cow.py --animal fish Turtles are cool too!
45+
usage: cowsay [-h] [--animal {beavis,cheese,cow,daemon,dragon,fox,ghostbusters,kitty,meow,miki,milk,octopus,pig,stegosaurus,stimpy,trex,turkey,turtle,tux}] message [message ...]
46+
cowsay: error: argument --animal: invalid choice: 'fish' (choose from 'beavis', 'cheese', 'cow', 'daemon', 'dragon', 'fox', 'ghostbusters', 'kitty', 'meow', 'miki', 'milk', 'octopus', 'pig', 'stegosaurus', 'stimpy', 'trex', 'turkey', 'turtle', 'tux')
47+
% python3 cow.py --help
48+
usage: cowsay [-h] [--animal {beavis,cheese,cow,daemon,dragon,fox,ghostbusters,kitty,meow,miki,milk,octopus,pig,stegosaurus,stimpy,trex,turkey,turtle,tux}] message [message ...]
49+
50+
Make animals say things
51+
52+
positional arguments:
53+
message The message to say.
54+
55+
options:
56+
-h, --help show this help message and exit
57+
--animal {beavis,cheese,cow,daemon,dragon,fox,ghostbusters,kitty,meow,miki,milk,octopus,pig,stegosaurus,stimpy,trex,turkey,turtle,tux}
58+
The animal to be saying things.
59+
```

0 commit comments

Comments
 (0)