[Kindergarten Garden] Making instructions clearer
See original GitHub issueI would like to be able to complete this exercise by reading the instructions without examining the tests. This is not currently possible because the instructions do not define the interface that the Garden
class is expected to implement.
From completing the exercise, I believe that the interface is:
- A constructor that takes one positional argument and one optional argument. The positional argument is the two rows of plant initials; the optional argument is a list of student names.
- When no argument is passed, the student names should be the 12 names from these instructions.
- A
plants
method that takes a positional argument : a student’s name. This should return a list of strings, where each string is the full name of a plant the student planted. The plant names should be left-to-right with the plants in the row closest to the window listed first.
I realize that most of the details of plants
return value appear in the instructions already, but the instructions never mention that there’s a function plants
that is returning these values, nor does it mention that some tests will construct a garden by passing in a new list of students.
I was confused that the stub code in the editor when you start this exercise has students
as a positional argument to the constructor, when the first 17/19 tests do not pass in a list of students.
This information could instead be added in docstrings in the initial code provided, but I don’t know how much stub code is allowed when this is a practice exercise rather than a new concept.
I’m happy to make the edits required to improve this exercise, if there are changes that would be welcome.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Now that #2915 has been merged, I am going to close this issue. Nice work, @astrieanna!
Yes, I’m interested. Thank you for the thorough and quick response. Sorry, I had a busy week and didn’t get back to this.
I’ll submit a PR for the
instructions.append
in the next few days.