Learn

The max() function takes any number of arguments and returns the largest one. (“Largest” can have odd definitions here, so it’s best to use max() on integers and floats, where the results are straightforward, and not on other objects, like strings.)

For example, max(1,2,3) will return 3 (the largest number in the set of arguments).

Instructions

1.

Try out the max() function on line 3 of the editor. You can provide any number of integer or float arguments to max().

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?