-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Problem description for Rectangles #2062
Comments
I read it without any indication that there is a number of lines (for the vertical length of the rectangle) that is arbitrary, but the length of those lines must match the length of the first line. Otherwise it is a rhombus. If it were a square then the specification, written, would say that the number of lines must match the length of the first line, which would provide us with a square. The first line means, the first line. I am not sure why that is not clear. Perhaps, though, I can agree that this line does not need to be there, we can enforce, and clarify in the tests. The tests, which are meant to be read, may clarify the meaning of the written words. And while the tests do not have to be exhaustive, (and most often should not be) the reading material should never contradict the tests. |
Also, thank you for the opportunity to talk about this exercise! |
For an input like:
those instructions indicate that the last two lines will be padded to the right with spaces, thus making all lines in the input equal length (five characters per line), rather than the first three lines having five characters and the last two lines having only three. Presumably, the student is spared the possibility of having to check for and prevent an index out of bounds. |
Well, now it makes sense in the context of the input format! Maybe no change is needed, or something simple like:
And/or a test to validate that? I'm happy to create a PR if a change would be helpful. If not, I'm equally happy to close this issue. |
The Rectangles problem asks users to count the number of rectangles in an array of ASCII text. In the problem description, an illustration of such an array is given, and its valid rectangles are called out.
However, there's a sentence at the end of the problem description that seems unhelpful:
What does this mean? It's confusing because:
I would propose that this sentence simply be removed, since knowing what a rectangle is seems pretty fundamental, and this sentence doesn't make anything clearer. If for some reason there needs to be explanatory text there, I think it should be helpful and unambiguous, perhaps like:
Or maybe the sentence is intended to convey something different than what a rectangle is? If that's the case, then I still think it could be clarified to communicate whatever is actually intended.
The text was updated successfully, but these errors were encountered: