Created
January 25, 2022 18:56
-
-
Save prav-raghu/0de63c2ab0adc61907fb7e75c2b701bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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