Created
November 5, 2021 09:49
-
-
Save Niall47/94c934bfaf0babcf7de7e4fcab7e1dba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string1 = 'GAGCCTACTAACGGGAT'.chars | |
string2 = 'CATCGTAATGACGGCCT'.chars | |
diff = 0 | |
string1.each_with_index do |character, index| | |
if character != string2[index] | |
diff +=1 | |
end | |
end | |
puts diff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment