mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Find max function in python
This commit is contained in:
10
Maths/FindMax.py
Normal file
10
Maths/FindMax.py
Normal file
@ -0,0 +1,10 @@
|
||||
# NguyenU
|
||||
|
||||
import math
|
||||
|
||||
def find_max(nums):
|
||||
max = 0
|
||||
for x in nums:
|
||||
if x > max:
|
||||
max = x
|
||||
print max
|
Reference in New Issue
Block a user