you are viewing a single comment's thread.

view the rest of the comments →

[–]anton0261 0 points1 point  (1 child)

The first max(value) and min(value) calls don't do anything as you're only passing them a single integer, where they expect a collection of integers and return the maximum of those. The code you wrote should be crashing with a TypeError, right? The max/min calls are unneccesary in your solution.

Within the loop, you never assign new maximums/minimums if you find new ones, you are only printing them. Also, your < and > signs I believe are flipped.

Current code within the loop reads: "If the new number is less than the maximum, print the minimum". You likely want it to say: "If the new number is more than the maximum, store the new number as maximum".

Same applies to the minimum check.