-
-
Save amankharwal/d84708629be45e0d5dcf1f9895c414e8 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 minimum(x): | |
minimum_index = 0 | |
current_index = 1 | |
while current_index < len(x): | |
if x[current_index] < x[minimum_index]: | |
minimum_index = current_index | |
current_index = current_index + 1 | |
return minimum_index | |
a = [23, 76, 45, 20, 70, 65, 15, 54] | |
print(minimum(a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment