Skip to content

Instantly share code, notes, and snippets.

@prav-raghu
Created January 25, 2022 18:56
Show Gist options
  • Save prav-raghu/0de63c2ab0adc61907fb7e75c2b701bf to your computer and use it in GitHub Desktop.
Save prav-raghu/0de63c2ab0adc61907fb7e75c2b701bf to your computer and use it in GitHub Desktop.
def minmax(data):
max = data[0]
min = data[0]
for k in data:
if(k > max):
max = k
if(k < min):
min = k
print('max: ' + str(max))
print('min: ' + str(min))
minmax([2, 3, 4, 5,-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment