Guest User

Untitled

a guest
Dec 10th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. values=[12,15,375,152,229,101,314,370,412,438,465,276,398,382,289,439,422,124,199,453,478,376,335,385,476,91,220,228,479,252,85,498,13,165,461,464,115,433,1,106,402,186,105,347,421,310,377,223,423,187]
  2. for i in range(len(values)):
  3. for v in range(len(values)):
  4. a=values[v]
  5. if v<len(values)-1 and a>values[v+1]:
  6. values[v]=values[v+1]
  7. values[v+1]=a
  8. print(values)
  9. new=sorted(values)
  10. if new==values:
  11. print("Success!")
  12. else:
  13. print("Failure!")
  14.  
  15. #I wasn't sure if I could make a sorting algorithm, so I checked it with the built in python one LOL
Add Comment
Please, Sign In to add comment