Python/maths/Find_Max.py

15 lines
203 B
Python
Raw Normal View History

2018-10-22 18:36:08 +00:00
# NguyenU
def find_max(nums):
max = nums[0]
2018-10-22 18:36:08 +00:00
for x in nums:
if x > max:
max = x
2018-10-22 18:42:08 +00:00
print(max)
def main():
find_max([2, 4, 9, 7, 19, 94, 5])
if __name__ == '__main__':
main()