5 kyu
Cricket Scores
19 of 85dinglemouse
Loading description...
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.
Another great problem from dinglemouse! Easier than the tennis one.
In Python the names of the batsmen are a string, not a list. Probably the description should be modified to reflect this.
This part was not clear to me.
"A string showing the batsmen names (in batting order) and runs they made (runs are in a 3-digit field)"
This could mean a couple of things:
It's the same order as the took to the field -- e.g. same as the input
batsmen
list. I've changed the input description to also mention "batting order" to remove any doubts.desperately wanted to solve this kata for my love of cricket. One of the best katas ever !
And, did you or not?
I did. :)
Someone should create an advanced version of this kata which will include wide balls, No-balls, 5-runs scored, leg-bye runs etc.
When/if this Kata becomes more popular I might do it. But right now there are only 64 total solves so if I create an advanced version then even less people would be bothered to attempt it.
As it cost me 90 extra minutes and i don't think it is a spoiler here is a hint - after the ball has been bowled 6 times the batsmans are swapping their places. Other hint - if score is odd - batsmans has to chenge their places as well.
I dodge this kata for the sake of my computer! This guy learned the rules, found a bug, never played cricket yet completed the KATA and provided HINTS!!! Someone give him a medal...
Alternatively just read the Kata Description! All this information and more is right there in the rules...
(and there was no bug)
Why in "wwwwwwwwww" H is not out?? clearly 10 consecutive bowers should to be out. Why in ".1" bower A has 1 point? (i think bower B should to have 1) Btw, ive solved all sample test but its not helping at all so perhaps one descriptive test in instruction would be a good idea. What is the difference between "..." and "....." ? I thought a dot means "change bower" but according to ".1" it looks im wrong.
Might be a bug. Thanks for reporting. I need some time to investigate it...
No bug. You are misinterpreting the rules of cricket.
clearly 10 consecutive bowers should to be out
- Wrong. H comes in to replace G. But H never faces a ball, because the bowler swaps ends after first over.I thought a dot means "change bower"
- Read the Kata description again. A "dot ball" is clearly described."1...231.3.4w" : 1 - 1 point for A but crossing take a place so B i hiting now ... - B hasn't scored for three balls bowled 2 - B has scored 2 points but stays in front of bowler 3 - B scored 3 points but as we have three crosses - A is facing bowler now - and here im lost as output is different According to wikipedia - if batsman scores odd numbers then batsamns are changing their roles One more thing...what is happening if batsman hasn't scored for 6 bowled balls "......" is he out? nvm - bowler swaps ends after first over...let me dig again
Correct
Correct
Correct
Wrong. Yes, A is now standing where B previously was, but A is not facing because now it is 2nd over (6 balls bowled) so bowler coming from the opposite end.
If you don't know even some rudimentary rules of cricket then this will be a very confusing Kata to do.
Maybe it is not for you.
I've missed information that batsmans are changing their places arter 6 balls bowled. Solved despite i've never seen cricket :-)
Batsmen stay where they are. Bowler changes ends.
This comment has been hidden.
Try here: https://gitter.im/Codewars/codewars.com/kata-solving-help
Are you obeying this rule?
This comment has been hidden.
'A 4 not out\nB 10\nC 'A 3 not out\nB 0\nC This might sound a stupid question to you.In first line the spacing between B and its score is 2*" " whereas in second line the spacing is 3*" ". In my case space is just constant which is 3*" ".This is the only reason im failing this kata.
So, you have answered your own question.
The spacing is important. It seems you are neglecting this rule:
I did it finally.That was really a good kata.Indians would love this kata
Yes, I hope so too. Pass it on to your friends. If all Indians like this Kata then I can get 1 billion upvotes
:-)
3
haha sure man
Thanks for this kata:)
Cricket is like our unofficial national game,so as an Indian I loved solving this kata :)
A game? I thought cricket was an Indian religion.
It is indeed :)
C# Translation added.Please review and approve~
Approved :-)
Enjoyed this kata. :D
:-)
Took me 6 hours to figure out an algorithm for this kata and i finnaly did it, i must say it was quite an adventure.
:-)
Well, it was quite an adventure... ;)
Python: why the input
batsmen
(which I had to print to see that it was a string), while it seems it doesn't ever change? (or does it?) If it is kept, it should be good to define it in the sample tests rather than in the preloaded part.OK, I just saw the test with a different order. you should only add the
team
string definition in the sample tests.DAAAAAAAAMMMNNNNNNN.... x)
I believe I'll go to bed right now... It is already in the sample tests... XD
I really liked this one. I joined this platform 2 days ago and to find one with cricket involved gave me the boost :) My solution is naive but glad I could solve this.
Thanks
@ZED
for approvingYeah , I came here to try but decided after reading the thing to leave it alone. This is one beta I won't be trying. Good luck to rest of you
JavaScript Translation Python Translation
Hi
@ZED
,I really liked this Kata so it was a shame it just sat there and nobody tried it. I guess warriors got frightened off by not knowing the game of cricket.
Anyway, thanks very much for your translations. Maybe this Kata can get better exposure now!
:-)