mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-24 16:55:45 +08:00
Improved Formatting and Style of Math Algos (#960)
* Improved Formatting and Style I improved formatting and style to make PyLama happier. Linters used: - mccabe - pep257 - pydocstyle - pep8 - pycodestyle - pyflakes - pylint - isort * Create volume.py This script calculates the volumes of various shapes. * Delete lucasSeries.py * Revert "Delete lucasSeries.py" This reverts commit 64c19f7a6c8b74e15bed07f0f0337598a001ceb4. * Update lucasSeries.py
This commit is contained in:
@ -1,12 +1,17 @@
|
||||
def main():
|
||||
def findMin(x):
|
||||
minNum = x[0]
|
||||
for i in x:
|
||||
if minNum > i:
|
||||
minNum = i
|
||||
return minNum
|
||||
"""Find Minimum Number in a List."""
|
||||
|
||||
|
||||
def main():
|
||||
"""Find Minimum Number in a List."""
|
||||
def find_min(x):
|
||||
min_num = x[0]
|
||||
for i in x:
|
||||
if min_num > i:
|
||||
min_num = i
|
||||
return min_num
|
||||
|
||||
print(find_min([0, 1, 2, 3, 4, 5, -3, 24, -56])) # = -56
|
||||
|
||||
print(findMin([0,1,2,3,4,5,-3,24,-56])) # = -56
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Reference in New Issue
Block a user