Ad
  • Custom User Avatar

    The second bonus value would be 1. So, you'd count 10 for the strike, 10 for the bonus on the strike, 10 for the spare (9/) and the next ball rolled as a bonus on the strike. So imagine a game if the first three frames looked like this:

    X 9/ 23

    So, the X would be 20 points (10 + 10), the 9/ frame would be 12 (10+2), and the 23 frame would be 5.

  • Custom User Avatar

    I am less impressed: it fails horribly when parentheses are nested like in 2^(3*(1+4)+1).

  • Custom User Avatar

    Write the function that parses the mileage number input, and returns a 2 if the number is "interesting" (see below), a 1 if an interesting number occurs within the next two miles, or a 0 if the number is not interesting.

    11209 + 2 = 11211 <- (The digits are a palindrome)

    The same for 109 (111 matches the "Every digit is the same number" criteria too).