1- def compare_string (string1 , string2 ) :
1+ def compare_string (string1 : str , string2 : str ) -> str :
22 """
33 >>> compare_string('0010','0110')
44 '0_10'
@@ -19,7 +19,7 @@ def compare_string(string1, string2):
1919 return "" .join (l1 )
2020
2121
22- def check (binary ) :
22+ def check (binary : [ str ]) -> [ str ] :
2323 """
2424 >>> check(['0.00.01.5'])
2525 ['0.00.01.5']
@@ -43,7 +43,7 @@ def check(binary):
4343 binary = list (set (temp ))
4444
4545
46- def decimal_to_binary (no_of_variable , minterms ) :
46+ def decimal_to_binary (no_of_variable : int , minterms : [ float ]) -> [ str ] :
4747 """
4848 >>> decimal_to_binary(3,[1.5])
4949 ['0.00.01.5']
@@ -59,7 +59,7 @@ def decimal_to_binary(no_of_variable, minterms):
5959 return temp
6060
6161
62- def is_for_table (string1 , string2 , count ) :
62+ def is_for_table (string1 : str , string2 : str , count : int ) -> bool :
6363 """
6464 >>> is_for_table('__1','011',2)
6565 True
@@ -79,7 +79,7 @@ def is_for_table(string1, string2, count):
7979 return False
8080
8181
82- def selection (chart , prime_implicants ) :
82+ def selection (chart : [[ int ]] , prime_implicants : [ str ]) -> [ str ] :
8383 """
8484 >>> selection([[1]],['0.00.01.5'])
8585 ['0.00.01.5']
@@ -126,7 +126,7 @@ def selection(chart, prime_implicants):
126126 chart [j ][i ] = 0
127127
128128
129- def prime_implicant_chart (prime_implicants , binary ) :
129+ def prime_implicant_chart (prime_implicants : [ str ] , binary : [ str ]) -> [[ int ]] :
130130 """
131131 >>> prime_implicant_chart(['0.00.01.5'],['0.00.01.5'])
132132 [[1]]
0 commit comments