Computer Science, asked by Jleena2035, 10 months ago

Which function returns item from the tuple with max value.

Answers

Answered by bonifacealeruchi
0

Answer:

max()

Description. The method max() returns the elements from the tuple with maximum value.

Answered by brokendreams
0

Python tuple method max() returns the elements from the tuple with maximum value.

Explanation:

  • The sequence of immutable Python objects refers to tuples.
  • These are similar to lists.
  • The main difference between tuples and lists is that lists can be changed but tuples can not.
  • Tuples use parentheses and lists use square brackets.
  • Tuples can be created by giving the desired values separated by commas.
  • The function called max(tuple) helps in returning the maximum values in tuples in python.
  • Consider the given example:

#!/usr/bin/python

tuple1, tuple2 = (234, 'abc', 'tina', 'sur'), (345, 800, 500)

print "Elemet with maximum value is : ", max(tuple1)

print "Elemet with maximum value is :: ", max(tuple2)

The ouput will be:

Max value element : tina

Max value element : 800

Learn more on:

https://brainly.in/question/6762268

Maximum number in the given list using function in python

https://brainly.in/question/15311961

Def x(data)

Z = max(data) - min(data)

return(Z)

The above defined data function in Python programming, will calculate the:

Inter quartile range

Mode

Median

Range

Similar questions