summaryrefslogtreecommitdiff
path: root/progs/a566.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a566.py')
-rw-r--r--progs/a566.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/progs/a566.py b/progs/a566.py
new file mode 100644
index 0000000..4ff8329
--- /dev/null
+++ b/progs/a566.py
@@ -0,0 +1,7 @@
+def hamming_Distance(n1,n2) :
+ x = n1 ^ n2
+ setBits = 0
+ while (x > 0) :
+ setBits += x & 1
+ x >>= 1
+ return setBits \ No newline at end of file