Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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]
- for i in range(len(values)):
- for v in range(len(values)):
- a=values[v]
- if v<len(values)-1 and a>values[v+1]:
- values[v]=values[v+1]
- values[v+1]=a
- print(values)
- new=sorted(values)
- if new==values:
- print("Success!")
- else:
- print("Failure!")
- #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