Retired
Will the Pandemic Ever End ? (retired)
Loading description...
Puzzles
Mathematics
Algorithms
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.
Description should reflect that if new_cases is equal to recovery, then it should return "It will never end!", as this is tested for in the tests.
Or allow the warrior to use his/her brain and just ask to return 'It will never end!' if based on the input the pandemic ... well, will never end. You don't need to be a rocket scientist to figure that one out.
This is a beginner kata, it's better to have the instructions clearly defined in the description, with little room for mistake.
Besides, there's no harm in adding something to the description.
You should use proper markdown just cause the examples are language specific. Else you should make it language agnostic
Basic manipulation of numbers is not a novel idea.
It's not, but for an 8 it's okay. Those are real training kata's and training comes with repetition. Not really an issue, imho.
IMO we should look at how many 8/7 katas we have already, do we really need more?
This statement could be assumed to mean "all math equations are manipulation of numbers, therefore we only need a few different math equations on this site". No?
I'm not sure if this exact equation has been done on the site before, but unless it has in this exact configuration with a similar problem setup, I don't see this as an issue.
Returning multiple data types is bad practice.
A little bit surprised by this issue. There are hundreds of katas returning multiple data types with same function. I think it's the beauty of Python and makes it unique from other languages like C++ that you can return multiple datatypes as per your function requirements.
The standarts for this on CW were much lower before. Different outputs make it impossible / complicated to translate your kata to languages that aren't loosely typed, which could be treated as an issue.
I agree that this is an issue. Yes Python is cool and can return multiple data types, but this isn't a case where you would need to return multiple data types as a good example. Its just being done so that the kata has some more personality.
Which is cool to have personality, but many users on this site are learning and its best to not confuse them into thinking this sort of function design is good practice.
Two options to fix:
-1
instead of the stringAnd yes other kata have this issue, that needs to be fixed.
What about
recovers == new_cases
? "It will never end!" (I guess :) --> it should be testedDone. Added 10 cases for this.
Consider also to add an edge case where
a
is an exact multiple ofr-n
, to avoid "lazy" calculation of the ceiling values; e.g.:Good1. Added now.
Nice simple kata. Btw great idea of including time calculations in the tests.
As for me, it seems that it will be better if time format was something like
'Awesome! You did it in {:6f} seconds'.format(perf_counter() - tic)
Missing corresponding imports in sample tests
Done.
Please add spacing to make it more readable, otherwise great1
Done.
I like your idea of including the time complexity calculation in test cases ! But I'm afraid it still somewhat lacks novelty!
Also you can reduce the random tests to 100
Use description-formatting for example tests and remove the function block (as well as parameter names) !
Random tests are reduced to 100 now.