Find Largest Number

Easy2s max execution

Implement a function that finds the largest number in a list of integers.

📝 Requirements:

  1. Input constraints:
    • The list numbers contains only integers
    • The list always contains at least one element
    • The list will never contain more than 10 elements
  2. Value constraints:
    • All integers are between -2³¹ and 2³¹-1 (32-bit integers)

💡 Example:

For the list [43, -19, 75, 1]:

  • The largest number is 75
  • Return value should be 75

🎯 Your Task:

Complete the find_largest_number function that takes a list of numbers and returns the largest value in that list.

Examples:

Input: [43, -19, 75, 1]
Output: 75

75 is the largest number in the list

Input: [-5, -10, -2, -1]
Output: -1

-1 is the largest number among negative numbers

Input: [42]
Output: 42

When there's only one number, it's the largest by default

Constraints:

  • 1 ≤ len(numbers) ≤ 10
  • -2³¹ ≤ numbers[i] ≤ 2³¹-1
  • List contains at least one element
  • All numbers are integers

Custom Test Input

Output

Loading Python environment...