Functions · 22 / 27 Exercise Medium

Search the greatest value in an array

Objective

Create a Python program with a function called find_largest_value that receives a list of 5 real numbers requested from the user. It must find and return the largest of those numbers.

Instructions

  • In the main function, ask the user for 5 real numbers and store them in a list.
  • Implement the function find_largest_value with the list as a parameter. It returns the largest value found.
  • Print a message with the largest value of the list.
Input
5.5
4.2
5.8
6.1
7.3
Output
The largest value in the array is: 7.3

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise