Beta
Probability #2 : The "not" Infinite Spinning Wheel
14 of 28bookdodo
Loading description...
Strings
Mathematics
Games
Puzzles
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.
Is there a reason, why probabilities (in percentages) are rounded down this time?
iirc, it was the same the last time
Python translation:
https://www.codewars.com/kumite/6065f9361760bf000efaa7e2?sel=6065f9361760bf000efaa7e2
approved by someone
What's the point of the tests with long strings?
There's actually no point. I reduced max string length from 10000 to 500 but increase the number of tests now.
The solution should be inside a
Describe
block.Tests produce warnings.
Is it possible in C++ to put the "It" around each actual test, with the "wheel" as test description? This would enhance debugging experience.
It's possible for fixed tests only. The random tests produce error from randomizing function. And I put "It" around the fixed tests now. There's probably a way to do it on random tests, but I don't know.
Maybe if you wrap the assert in a method decorated with "It", with a formatted string as description. Not sure this is possible in C++ though.