Languages
[Edit]
EN

Python - max() method example

0 points
Created by:
MMORex
660

The max() function returns the highest number from given numbers.


1. Documentation

Edit
Syntax

or

Parametersx1, x2, xN - values to compare
Result

Maximal number value.

It returns TypeError if at least one of the provided values is not a number.

Descriptionmax is a method that takes number arguments and returns the biggest value.

2. Getting max value from array examples

Edit

2.1. With max() method

Edit

2.2. By comparing all the elements in the array

Edit

References

Edit
  1. Maxima and minima - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - Math.max()

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join