From 7b32b17139bda4e58d088b2a4c71bb3f80f9c8db Mon Sep 17 00:00:00 2001 From: Anant Prasad Date: Sun, 28 Oct 2018 01:15:41 +0530 Subject: [PATCH] Exercism hammer question solution --- README.md | 2 +- hammer.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 hammer.py diff --git a/README.md b/README.md index 6192cf8..c324a48 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # Data-Structures -This repository contains implementation of data structures in java. +This repository contains implementation of data structures in java and python. diff --git a/hammer.py b/hammer.py new file mode 100644 index 0000000..ecf5b41 --- /dev/null +++ b/hammer.py @@ -0,0 +1,11 @@ +class hammer(object): + def dna(self,str1,str2): + self.str1=str1 + self.str2=str2 + j=0 + c=0 + for i in str1: + if i!=self.str2[j]: + c+=1 + j+=1 + print c