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.
I had a lot of fun solving this kata, FrankK, thank you. Test cases for python are written out properly, pleasure to work with.
Gute Arbeit.
Python random tests expect you to simply return the given array instead of lcm of its elements, lol
This comment is hidden because it contains spoiler information about the solution
Note taken. Input validation is removed and warriors will only get positive numbers in tests.
Thanks for the feedback.
Thank you for a detailed and precise task description, nice kata!
Nice kata, but some things were not clear from the task:
A) The directories need to be stacked up:
("www.microsoft.com/important/confidential/docs/index.htm#top", " * ") becomes "<а href="/">HOME</а> * <а href="/important/">IMPORTANT</а> * <а href="/important/confidential/">CONFIDENTIAL</а> * <spаn class="active">DOCS</spаn>
As you see for CONFIDENTIAL you need to use /important/confidential/ as href and likewise with deeper paths. Maybe it's clear for those familiar with breadcrumbs, but I still think it's worth mentioning in the description.
B) The rules say: "if one element (OTHER THAN ROOT/HOME) is longer than 30 characters, you have to shorten it, acronymizing it"
However, tests require that the root also needs to be acronymed, e.g.
("https://codewars.com/web/kamehameha-or-skin-the-for-diplomatic-from-to-or", " - ") expects <a hrеf="/">HOME</а> - <а href="/web/">WEB</а> - <spаn class="active">KSD</spаn>. It's not hard to fix it while passing the tests, however I believe the rules should be updated.
Other than that great kata, challenging but not too hard!
Nice kata, although I struggled a bit with:
Rules don't mention that candidates that got no first-preference votes at all should be removed from the ballot as well. Thanks to those who pointed it out here.
You always work with first-preference votes. "...find the candidate who got the least votes and remove them from each person's voting list. In case of a tie for least, remove all of the tying candidates..." means find the candidate(s) who got the least votes AMONG FIRST-PLACERS. My mistake at first was to think that I should check the last places on each voter's ballot.
Hi, at first I was a bit confused with points logic as well, let's go step-by-step:
Frame 1: A strike, so 10 points plus points for the next two ROLLS (bear in mind, not the next two frames). The next two rolls are another strike (10 points) and 9. Total frame score: 10 + 10 + 9 = 29
Frame 2: A strike, so 10 points plus points for the next two ROLLS, which are 9 and /. 9/ means 9 pins on a first roll, and the remaining one on a second. Total frame score: 10 + 9 + 1 = 20
Frame 3: A spare, so 10 points plus points for the next roll, which is 8. Total frame score: 10 + 8 = 18
Frame 4: An easy one, no strikes or spares. Simply count the points. Total frame score: 8 + 0 = 8
Frame 5: A strike, so 10 points plus points for the next two rolls, which are another strike and 9. Total frame score: 10 + 10 + 9 = 29
Frame 6: A strike, so 10 points plus points for the next two rolls, which are 9 and 0. Total frame score: 10 + 9 + 0 = 19
Frame 7: No strikes or spares. Total frame score: 9 + 0 = 9
Frame 8: A spare, so 10 points plus points for the next roll, which is 7. Total frame score: 10 + 7 = 17
Frame 9: A spare, so 10 points plus points for the next roll, which is 4. Total frame score: 10 + 4 = 14
Frame 10: Remember, in 10th frame there are no bonus points for the next rolls in case of a strike/spare. Here it is not the case though, simply count the points. Total frame score: 4 + 4 = 8
Total points: 29 + 20 + 18 + 8 + 29 + 19 + 9 + 17 + 14 + 8 = 171, as desired
Have fun coding!
This comment is hidden because it contains spoiler information about the solution
ok i tried a solution from other person and it also works. Good then, thanks for your time and effort :D
random tests still not working:
File "main.py", line 23, in random_tests
from random import randint, sample, choices
ImportError: cannot import name 'choices'
the version is set to 3.6.0 so it's weird, do you have any ideas why it could be throwing this error? thanks!
Thank you guys a lot! It seems like authoring kata is more than just coming up with a task :D I'll definitely look into other katas and how they are designed.
ok, looks like it's better now.
I copied @FArekkusu code and changed it a bit (I think for the worse :D, i wasn't aware of some syntax he used). But at least random tests seem to be working now.
sorry if something is still wrong, let me know about it!
thank you, trying it now.
Loading more items...