How is the max( ) function used?



How is the max( ) function used?


We start the exercise with an empty variable called maximum that we want to assign a value to. The value should use the max() function to return the largest number in the set of arguments you provide to it.
For example, if we did my_var = max(1, 2, 3), the value stored in my_var would be 3!
If you think you’ve done this correctly and still can’t pass the exercise, please try the following:

  1. Try using Chrome, as it’s typically the most reliable browser.
  2. Clear your browser cache and press Ctrl + F5 (Windows) or Cmd + Shift + R (Mac)
  3. If none of that works, please check out our [official troubleshooting guide]
    (Troubleshooting Guide)

FAQ: Learn Python: Functions - max()
FAQ: Learn Python: Functions - min()