5 kyu

Bowling score calculator

633 of 1,540tpatja
Description
Loading description...
Games
Algorithms
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Great kata of the bowling series, well done.

  • FArekkusu Avatar

    Python, JavaScript, and CoffeeScript sample tests are using Test.expect.

  • FArekkusu Avatar

    No random tests in Python, JavaScript, and CoffeeScript.

  • vmunhoz Avatar

    I don't understand the the 190 test case. It has 10 [9,1] scores, so it is 10 consecutive spares. The first one is the only one that is not doubled, so it sums up to 190. But the extra ball is a 9. Isn't the answer 199 instead of 190 for this specific case? (I was doing it in Python)

  • insideoutclub Avatar

    Rust translation kumited .

  • solitude Avatar

    This comment has been hidden.

  • wneumann Avatar

    Swift version kumited. Please review and approve if acceptable.

  • GiacomoSorbi Avatar

    Ruby and Crystal translations kumited :)

  • r0g Avatar

    FYI: Submit button not enabled in Firefox 46.0 on Ubuntu 14.4.3 64bit. Works fine in Chromium 49.0.2623.108 same machine.

  • bhavesh_03 Avatar

    I have tested my code on my system as well as by printing on codewar's console. I am getting the expected value of the given test cases but it raises value not expected error. Is it something related to time constraint?

  • sprengerjo Avatar

    I have published a clojure translation. Can some1 approve plz :)

  • tormod17 Avatar

    This comment has been hidden.

  • ucy Avatar

    Test case is too complete. Maybe just put 2 test there, i think it will be better

  • Bodigrim Avatar

    Describe rules for the 10th frame and give some examples of calculations (e. g., how to earn 300 points). It is very hard to understand rules from your description.

  • adrianheine Avatar

    I didn't understand from the description that a strike in the last frame gives you two extra rolls, and I didn't get that extra balls only count once. The default test cases where helpful, though

  • jolaf Avatar

    Those rules for the last frame are crazy. They must be explained very carefully and precisely.

  • etorreborre Avatar

    This comment has been hidden.

  • Arheus Avatar

    That was fun!

  • Azuaron Avatar

    You should use test.assert_equals instead of test.expect when comparing two values (and always add error messages!)

  • 0rvar Avatar
    • Need more tags
    • Tests show up as one single test, with no good error messages - temporary bug?
  • Darfeld Avatar

    typos in the name of the function and in the test, one "test" in writen "text"

  • Katzen_gott Avatar

    In Python function is named bowling() and tests call bowling_score() Second test call has typo: it says 'text' instead of 'test'

  • ernestoferro Avatar

    One of the tests uses the module "Text" instead of "Test" It would be better to use Test.assert_equals and to add some error message.

  • kazagistar Avatar

    The instructions are not clear for someone who has not played bowling before. Specifically, I could not figure out how 2 or 3 balls are chosen in the 10th frame, and had to go spend a half hour looking up rules.

    I suggest adding something like this:

    If the player gets a strike on the tenth frame, they get two bonus balls, that only count towards the bonus score for that strike, not towards a frame score. Similarly, if they get a spare, they get one such bonus ball.

    This was rather frustrating to deal with, and has nothing to do with programming.

  • longqm Avatar

    the rules given by instructions is not so clear! About the last frame

  • ajnsit Avatar

    Needs more explanation of the last frame being a strike or a spare

  • user527539 Avatar

    A game consists of 10 frames. In each frame the player rolls one or two balls, except for the 10th frame, where the player rolls 1, 2 or 3 balls.

    Is it possible to roll just one ball in the final frame?

  • bartavelle Avatar

    This comment has been hidden.

  • ChrisN Avatar

    Definitely needs more test case examples. This kata is all about the corner cases. Nice excercise though, it's deceptively hard!

  • xcthulhu Avatar

    Finally! I was wondering when this would show up on the website.

    Every software firm in Chicago seemingly uses this as its interview question.

    Great exercise.