Find Maximum in List
Beginner
Find the Maximum Number in a List
In this fun and simple challenge, your task is to write a function that takes in a list of numbers and returns the largest number from the list! You will need to use your inner detective to figure out which number is the biggest – it's like finding the tallest tree in a forest!
Consider this problem as a real-life scenario where you have a box of different candies, and you want to pick the candy with the maximum size!
Here's how your function should behave:
find_max_in_list([1, 2, 3, 4, 5]) # Output: 5 find_max_in_list([10, 9, 8, 7, 6]) # Output: 10 find_max_in_list([-1, -2, -3, -4]) # Output: -1
Your mission, should you choose to accept it, is to implement the find_max_in_list function that doesn't just find any number, it finds THE number. Let's get started!
Inputs
Arg 1:
[1,2,3,4,5]Expected Output
5Actual Output