@@ -0,0 +1,491 @@
+from hamming_distance import hamming_distance%0A%0Adef approximate_pattern_count(text, pattern, d):%0A  count = 0%0A  pattern_length = len(pattern)%0A  for i in range(0, len(text) - pattern_length + 1):%0A    _pattern = text%5Bi:i + pattern_length%5D%0A    if (hamming_distance(pattern, _pattern) %3C= d):%0A      count += 1%0A  return count%0A%0A%0Aif __name__ == %22__main__%22:%0A  text = raw_input(%22Text: %22)%0A  pattern = raw_input(%22Pattern: %22)%0A  d = int(raw_input(%22D: %22))%0A  print approximate_pattern_count(text, pattern, d)%0A

Add aproximate pattern count algorithm