Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # algothrim selection sort
- import random
- box = []
- for i in range(0,8):
- box.append(random.randrange(1, 1000, 1))
- print box
- min = box[0]
- for j in range(0, len(box)):
- if box[j] < min:
- min = box[j]
- pos = j
- tmp = box[0]
- box[0]= min
- box[pos] = tmp
- print box
- print box
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement