Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 8, 2021 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amankharwal/d84708629be45e0d5dcf1f9895c414e8 to your computer and use it in GitHub Desktop.
Save amankharwal/d84708629be45e0d5dcf1f9895c414e8 to your computer and use it in GitHub Desktop.
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