mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
psf/black code formatting (#1421)
* added sol3.py for problem_20 * added sol4.py for problem_06 * ran `black .` on `\Python`
This commit is contained in:

committed by
Christian Clauss

parent
11e2207182
commit
7592cba417
@ -11,6 +11,7 @@ a=daBcd and b="ABC"
|
||||
daBcd -> capitalize a and c(dABCd) -> remove d (ABC)
|
||||
"""
|
||||
|
||||
|
||||
def abbr(a, b):
|
||||
"""
|
||||
>>> abbr("daBcd", "ABC")
|
||||
|
@ -58,7 +58,7 @@ if __name__ == "__main__":
|
||||
print("\nInvalid input, please try again.")
|
||||
except NameError:
|
||||
print("\n********* Invalid input, good bye!! ************\n")
|
||||
|
||||
|
||||
import doctest
|
||||
|
||||
doctest.testmod()
|
||||
|
@ -20,6 +20,7 @@ def fracKnapsack(vl, wt, W, n):
|
||||
else sum(vl[:k])
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
|
||||
|
@ -76,7 +76,7 @@ if __name__ == "__main__":
|
||||
expected_subseq = "GTAB"
|
||||
|
||||
ln, subseq = longest_common_subsequence(a, b)
|
||||
## print("len =", ln, ", sub-sequence =", subseq)
|
||||
## print("len =", ln, ", sub-sequence =", subseq)
|
||||
import doctest
|
||||
|
||||
doctest.testmod()
|
||||
|
@ -29,6 +29,7 @@ def isSumSubset(arr, arrLen, requiredSum):
|
||||
# print(subset[i])
|
||||
print(subset[arrLen][requiredSum])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
|
||||
|
Reference in New Issue
Block a user