Hello everyone,
I’m facing an issue with the Hamming Distance exercise and would like to know if anyone else is experiencing this problem. The exercise is described as follows:
Instructions: Calculate the Hamming distance between two DNA strands.
When cells divide, DNA replication can contain errors, and Hamming distance helps quantify these errors by comparing two DNA strands. The Hamming distance is defined only for sequences of equal length.
Implementation Notes: The Hamming distance is only defined for sequences of equal length. Therefore, attempting to calculate it between sequences of different lengths should not work.
The problem is that scripts accepting more than two arguments are passing the tests. According to the instructions, the function should accept only two DNA strands and calculate the Hamming distance between them. However, it seems that the tests are accepting scripts that do not follow this restriction.
In this case I checked if the number of arguments is less than or equal to 1 and because the tests only validate a case where a smaller number of arguments are passed, my script passed (although it should have failed).