Created
August 31, 2018 11:45
-
-
Save mauricioaniche/73366e8e00686e3d44cb48f971599716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find(nums): | |
smallest = 9999 | |
largest = -9999 | |
for num in nums: | |
if(num < smallest): | |
smallest = num | |
if(num > largest): | |
largest = num | |
print(smallest) | |
print(largest) | |
find([29, 37, 4, 5]) | |
find([29, 28, 27, 26]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment