13. Max()


#1



# Set maximum to the max value of any set of numbers on line 3!

maximum = 15

print max(maximum)

Please help me


#2

Best advice I can give to you is read the Python Docs on the max() function,

https://docs.python.org/2/library/functions.html


#3

Hi as bandit said read the docs.

In the comment, it says find the max value of any set of numbers, 15 is not a set.

So you need to set the variable maximum to a set e.g. (1,3,5,20,15)


#4

Go to AFTER where is says maximum on line 3. your page should look like below. then enter max( ) put in a string of numbers separated by commas. You are finding the maximum number in the string of numbers.

1.
2.
3. maximum = max(140, 20, 200)

You are done.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.