7 kyu
These are not my grades! (Revamped !)
1,399kingcobra
Loading description...
Object-oriented Programming
Debugging
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I have no idea what does this quiz what me to do. Can you put some example like what's the expected output?
find the bug that is producing the undesired output
There are no final tests passing a non-empty
grades
to__init__
.Well spotted. I've added a few tests addressing that.
I think you should explain just a bit more what would be the normal behavior and make some changes in the tests. The goal of the kata is quiet interesting and absolutely valuable, but its "form" does not serve it well because this type of error can be quite painful to identify for beginners.
test.expect
totest.assert_equals
and provide the expected value. Yes, that will make your kata easier (a bit), but I believe doing so will also save you a lot of angry messages and complaints from beginners. Let's just look at the satisfaction rate right now... If the kata stays like that, it will never go out of beta.Ease the way for the warriors. The idea behind your kata is very important to managed, so it will be faaaaaaar more usefull to everybody if you do not hide it behind other difficulties (for example, I had to implement the
__str__
method and modify the sample tests to dig into the problem)'Hope this will help.
Cheers!
EDIT: I just took a look at the tests: you can hide the average tests if you want with
expect
, but not the ones that test for each elements of thegrades
list, in my opinion.Thank you very much, once again! ;)
I added some examples in the description that should help make the kata more approachable. I also changed the
tests
from.expect
to.assert_equals
. However, for some reason the example test cases won't update and my modifications aren't showing... any idea what could be causing this?EDIT : Nevermind, the example test cases should be ok, now. Sometimes I get this weird error where I'll modify the test cases, re-publish, and not see any changes in the actual kata.
EDIT : Tried to change the example test cases again and they won't update. Tried unpublishing and republishing, logging out and logging back in, no change. Weird.
That's perfect!
FYI: when changes are made by a sensei in the example tests, one has to
reset
them in the trainer to see them (example tests and code of the warrior are saved together so that one can "come back later" without starting again from the beginning, but that present the drawback you just encountered)cheers!
Thank you very much! :)
For those who are riddled by this kata, you can google "mutable default arguments", I hope this helps
Needs random tests.
Good idea, will add some later. Is it always good practice to have random tests?
Yes, because it:
You can, of course, always add manual, edge cases yourself to complement with random tests. (For example, one solution totally drops the
grades
argument in the constructor.)Sounds good, thank you very much!
Random test cases added.