mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-04 16:57:32 +08:00
Fix indentation contains tabs (flake8 E101,W191) (#1573)
This commit is contained in:

committed by
John Law

parent
dbaedd4ed7
commit
b838f1042c
@ -1,11 +1,11 @@
|
||||
def compare_string(string1, string2):
|
||||
"""
|
||||
>>> compare_string('0010','0110')
|
||||
'0_10'
|
||||
|
||||
>>> compare_string('0110','1101')
|
||||
-1
|
||||
"""
|
||||
>>> compare_string('0010','0110')
|
||||
'0_10'
|
||||
|
||||
>>> compare_string('0110','1101')
|
||||
-1
|
||||
"""
|
||||
l1 = list(string1)
|
||||
l2 = list(string2)
|
||||
count = 0
|
||||
@ -21,9 +21,9 @@ def compare_string(string1, string2):
|
||||
|
||||
def check(binary):
|
||||
"""
|
||||
>>> check(['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
>>> check(['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
pi = []
|
||||
while 1:
|
||||
check1 = ["$"] * len(binary)
|
||||
@ -45,9 +45,9 @@ def check(binary):
|
||||
|
||||
def decimal_to_binary(no_of_variable, minterms):
|
||||
"""
|
||||
>>> decimal_to_binary(3,[1.5])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
>>> decimal_to_binary(3,[1.5])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
temp = []
|
||||
s = ""
|
||||
for m in minterms:
|
||||
@ -61,12 +61,12 @@ def decimal_to_binary(no_of_variable, minterms):
|
||||
|
||||
def is_for_table(string1, string2, count):
|
||||
"""
|
||||
>>> is_for_table('__1','011',2)
|
||||
True
|
||||
|
||||
>>> is_for_table('01_','001',1)
|
||||
False
|
||||
"""
|
||||
>>> is_for_table('__1','011',2)
|
||||
True
|
||||
|
||||
>>> is_for_table('01_','001',1)
|
||||
False
|
||||
"""
|
||||
l1 = list(string1)
|
||||
l2 = list(string2)
|
||||
count_n = 0
|
||||
@ -81,12 +81,12 @@ def is_for_table(string1, string2, count):
|
||||
|
||||
def selection(chart, prime_implicants):
|
||||
"""
|
||||
>>> selection([[1]],['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
|
||||
>>> selection([[1]],['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
>>> selection([[1]],['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
|
||||
>>> selection([[1]],['0.00.01.5'])
|
||||
['0.00.01.5']
|
||||
"""
|
||||
temp = []
|
||||
select = [0] * len(chart)
|
||||
for i in range(len(chart[0])):
|
||||
@ -128,9 +128,9 @@ def selection(chart, prime_implicants):
|
||||
|
||||
def prime_implicant_chart(prime_implicants, binary):
|
||||
"""
|
||||
>>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
|
||||
[[1]]
|
||||
"""
|
||||
>>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
|
||||
[[1]]
|
||||
"""
|
||||
chart = [[0 for x in range(len(binary))] for x in range(len(prime_implicants))]
|
||||
for i in range(len(prime_implicants)):
|
||||
count = prime_implicants[i].count("_")
|
||||
|
Reference in New Issue
Block a user