Skip to content

Latest commit

 

History

History
 
 

09-Max_integer_from_list

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

09 Max integer from my_list

📝 Instructions:

  1. Create a function named max_integer

  2. This function should take a list as an input parameter and return the maximum number found in the list.

  3. You should use a for loop to iterate through the list.

  4. Use the print() function to print what the function returns when it is called.

    • For example: print(my_function(param))

💡 Hints:

  • Define an auxiliary variable and set the first value to the first element on the list.

  • Then compare the variable with all the items in the list.

  • Replace the value every time the new element is bigger than the one stored in the auxiliary variable.

  • At the end, you will have the biggest number stored in the variable.

💻 Expected result:

5435