Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Your assertions ( both fixed and random ) should have failure messages showing the test case input.
Otherwise, the random tests are fine.
Thank you for your help!
You do not need to delete my solution. After you add random tests, my solution will become invalid and will be hidden. You do not have to do anything.
Yes. I understood my mistake. Can you recheck my kata again?
One more question. How to delete your wrong solution now? Is there any way to do it or I should create new kata and delete existing one? Thank you for your help. I create this kata first time in my life... Sorry.
Yep! I understood my fault! Thank you! Improved. Can you check it again, please. And approve that I am done. Sorry, it's my first kata... Thank you for your help.
No random tests.
Randomised tests would be sufficient as well, but you need something to prevent hardcoding.
In general, its not true that only problems with unlimited amount of possible results need random tests. Problems with finite amount of inputs can use at least random order of inputs, because otherwise tests can pass without actuall solving the problem: https://www.codewars.com/kata/reviews/66a2ba8bcfbe5c089a825b13/groups/66a3edc83fd3442e48346c58
Whether shuffling is needed for this simple problem can be argued, but it's a good practice in Codewars kata in general, it's easy, cheap, so why not. It's also mentioned in authoring guidelines. It would stop my wrong solution from passing.
I didn't included random tests because the month value always are correct(please read kata instructions carefully). There are only 12 of months in the year. My fixed tests include checking all 12 months when the user presses 'ATTEMPT' button. Random tests are only needed when the algorithm can receive an infinite number of inputs. Here, this value is fixed and equals 12. And when the user presses 'ATTEMPT' button, all 12 are checked.
Improved! Thank you for finding the issue.
No random tests.
The mapping from month to season should be specified. I would consider March to be winter. Also, the southern hemisphere exists.