87. Python Program to Find the Largest of N Numbers
MediumSum and count
Overview
Keep the best value so far, and replace it when a bigger one arrives.
Problem Statement
The first line says how many numbers follow (1 or more). Read that many whole numbers, one per line, and print the largest. The numbers can be negative. For example, for 4 followed by 12, 40, 7 and 33:
Largest: 40
Use input() with no prompt text: the tests type the input for you, and a prompt would end up in your output.
Input
One value per line, in this order. Example:
4
12
40
7
33
Output
The output for that example:
Largest: 40
The tests try 3 different inputs.