Skip to content

Instantly share code, notes, and snippets.

@mauricioaniche
Created August 31, 2018 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauricioaniche/73366e8e00686e3d44cb48f971599716 to your computer and use it in GitHub Desktop.
Save mauricioaniche/73366e8e00686e3d44cb48f971599716 to your computer and use it in GitHub Desktop.
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