Ad
  • Custom User Avatar

    Given a base number and a possible factor, you have to check if the division's resulting remainder is 0.

    You can use the mod operator (%) in most languages to check for a remainder
    If the remainder is 0 then the number is a factor.

    For example:

    3 is a factor of the base number 6 because the operation (6 % 3) returns a remainder of 0.

    2 is not a factor of 7 because: 7 % 2 = 1

  • Custom User Avatar

    You seem to have renamed the original function from

    DNA_strand(dna)

    to:

    DNAstrand(dna)

    Be sure to use the originally-named function.

  • Custom User Avatar

    No, there's a newline after the third digit: "123\n".

    That's why the closing quote is below the digits.

    Your code should be able to handle edge cases like the stated above.

  • Custom User Avatar

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