Editor settings

General settings

Save settings

Learn to program with Python

Find the largest number in a list #

Write a function that finds the largest number in a given list of integers. The first argument of the function is a list of integers.

We encourage you to avoid using the function max() for this challenge.


Tests #

  • get_largest_number([5, 10, 15, 20, 25]) should return 25
  • get_largest_number([100, 200, 300, 400, 500]) should return 500
  • get_largest_number([-10, -5, -20, -15, -25]]) should return -5
  • get_largest_number([9, 7, 5, 3, 1, -1]) should return 9
Output will be displayed here