Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

max-value

Write a function, max_value, that takes in list of numbers as an argument. The function should return the largest number in the list.

Solve this without using any built-in list methods.

You can assume that the list is non-empty.

test_00:

max_value([4, 7, 2, 8, 10, 9])

test_01:

max_value([10, 5, 40, 40.3])

test_02:

max_value([-5, -2, -1, -11])

test_03:

max_value([42])

test_04:

max_value([1000, 8])

test_05:

max_value([1000, 8, 9000])

test_06:

max_value([2, 5, 1, 1, 4])