-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
The width of grades can exceed a single character and may even be non-numeric. #253
base: main
Are you sure you want to change the base?
Conversation
|
Hi Glenn,
|
We can still work in the context of this PR. Just add further commits to it. If we're going to add non-digit grades:
I do appreciate your contribution. Please see the Practice Exercise doc for all the little details about how exercises are constructed within a track. |
@IsaacG I'm OK with adding a new test. This exercise gets students to practice sorting and having non-numeric grades adds an interesting new wrinkle to it. |
I'm not seeing a justification for these updates to be awk specific and to diverge from the problem specs. |
…re sorted by grades and then by name in the roster
When I initially created this PR, I was do not aware of the example solution, and I didn't make any effort to change it, which needs new/update specs. What prompted me to change the test "Students are sorted by grades and then by name in the roster", was that my initial code for this problem passed all tests, until Filbo advised me to generalize the code to accept more than one digit. I realized that all tests had only one digit in grades. My code in the last iteration accepted numerals and non-numeric values which gave me the idea to change the test to include non-numeric values. |
However, I haven't completely abandoned my idea. I might create a new problem that involves sorting both numeric and non-numeric values. |
I'm willing to go forward with this, but it has to be a new test not modifying an existing one. |
While mentored by Filbo, he revealed to me the idea of generalizing the code to accept grades with width more than one character. I checked it to accept also non-numeric grade values. I adjusted my code to pass this test, and I changed one of the testes to do this kind of test.