Skip to content

Commit 00f7602

Browse files
authored
Tabs --> spaces in quine_mc_cluskey.py
1 parent 5683025 commit 00f7602

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

boolean_algebra/quine_mc_cluskey.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
def compare_string(string1, string2):
22
"""
3-
>>> compare_string('0010','0110')
4-
'0_10'
5-
6-
>>> compare_string('0110','1101')
7-
-1
8-
"""
3+
>>> compare_string('0010','0110')
4+
'0_10'
5+
6+
>>> compare_string('0110','1101')
7+
-1
8+
"""
99
l1 = list(string1)
1010
l2 = list(string2)
1111
count = 0
@@ -21,9 +21,9 @@ def compare_string(string1, string2):
2121

2222
def check(binary):
2323
"""
24-
>>> check(['0.00.01.5'])
25-
['0.00.01.5']
26-
"""
24+
>>> check(['0.00.01.5'])
25+
['0.00.01.5']
26+
"""
2727
pi = []
2828
while 1:
2929
check1 = ["$"] * len(binary)
@@ -45,9 +45,9 @@ def check(binary):
4545

4646
def decimal_to_binary(no_of_variable, minterms):
4747
"""
48-
>>> decimal_to_binary(3,[1.5])
49-
['0.00.01.5']
50-
"""
48+
>>> decimal_to_binary(3,[1.5])
49+
['0.00.01.5']
50+
"""
5151
temp = []
5252
s = ""
5353
for m in minterms:
@@ -61,12 +61,12 @@ def decimal_to_binary(no_of_variable, minterms):
6161

6262
def is_for_table(string1, string2, count):
6363
"""
64-
>>> is_for_table('__1','011',2)
65-
True
66-
67-
>>> is_for_table('01_','001',1)
68-
False
69-
"""
64+
>>> is_for_table('__1','011',2)
65+
True
66+
67+
>>> is_for_table('01_','001',1)
68+
False
69+
"""
7070
l1 = list(string1)
7171
l2 = list(string2)
7272
count_n = 0
@@ -81,12 +81,12 @@ def is_for_table(string1, string2, count):
8181

8282
def selection(chart, prime_implicants):
8383
"""
84-
>>> selection([[1]],['0.00.01.5'])
85-
['0.00.01.5']
86-
87-
>>> selection([[1]],['0.00.01.5'])
88-
['0.00.01.5']
89-
"""
84+
>>> selection([[1]],['0.00.01.5'])
85+
['0.00.01.5']
86+
87+
>>> selection([[1]],['0.00.01.5'])
88+
['0.00.01.5']
89+
"""
9090
temp = []
9191
select = [0] * len(chart)
9292
for i in range(len(chart[0])):
@@ -128,9 +128,9 @@ def selection(chart, prime_implicants):
128128

129129
def prime_implicant_chart(prime_implicants, binary):
130130
"""
131-
>>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
132-
[[1]]
133-
"""
131+
>>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
132+
[[1]]
133+
"""
134134
chart = [[0 for x in range(len(binary))] for x in range(len(prime_implicants))]
135135
for i in range(len(prime_implicants)):
136136
count = prime_implicants[i].count("_")

0 commit comments

Comments
 (0)