London | 26-SDC-Mar | Khilola Rustamova| Sprint 4 |Implement cowsay#503
London | 26-SDC-Mar | Khilola Rustamova| Sprint 4 |Implement cowsay#503HilolaRustam wants to merge 9 commits into
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Part of your implementation may be missing, can you check?
LonMcGregor
left a comment
There was a problem hiding this comment.
Almost there! Good work
|
|
||
| animal = args.animal or "cow" | ||
|
|
||
| print(getattr(cowsay, animal)(message)) |
There was a problem hiding this comment.
Do you need this print() here?
There was a problem hiding this comment.
Yes, cowsay returns a string rather than printing directly, so print() is needed. I’ll refactor it slightly for readability by separating the function call from the print statement.
LonMcGregor
left a comment
There was a problem hiding this comment.
Great,there's just one thing left. When you run this, do you see the final line says "None"? Why does it print this?
LonMcGregor
left a comment
There was a problem hiding this comment.
Great! the function prints the output by itself.
|
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
Implement cowsay exercise is completed.
Questions