You need to sign in or sign up before continuing.×
Ad
  • Default User Avatar

    Could someone please explain to me where/how this passes the last test where you have to only replace the last occurrence of the number? When I tried the replace method, foo99bar99 or whatever became foo100bar99 or foo100bar100. I can't figure out what part of this is addressing that.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I think what it's trying to say is that you have the lowest possible value of the range, which it refers to as 'begin'. This begin is the first number in the sequence. Then you have the highest possible value in the range, which they call 'end'. This is the second number in the sequence. Then they say the third number is called the 'step'. Its pretty much just how much you jump from number to number by. Lets say we have a sequence 1, 4, 2. The lowest possible value (which is also the number we start at) is 1, while 4, the second value, is the highest possible number we can go to. Then we have 2. Put it simply, 2 is the number we count by. So for this sequence, the answer would be 1, 1+2(3), 3+2(5) oops, 5 is higher than 4! So 1 + 1+2(3) = 4 would be the answer for the sequence 1, 4, 2. Hope this helps!

  • Default User Avatar

    I feel stupid, I don't understand the assignment. Could someone who has done this explain what it's asking us to do? I scrolled through many comments and found instructions about edge cases and complaints about vagueness but couldn't find an improved description for the whole assignment. Thank you!