Loading...
Loading...
Loading...
A teacher has the marks of a class. Print the highest mark on the first line and the lowest mark on the second line.
Example
Input
4 72 95 61 88
Output
95 61
95 is the highest and 61 the lowest.
Try the problem first. Open one hint at a time.
Start with the first mark as both the highest and the lowest so far, then compare each next mark.
The built-in functions max and min do the same job in one call each.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor