Guest User

Untitled

a guest
Oct 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. # How many number we have to sort
  2. num = int(input("How many figures : "))
  3. storage = []
  4. result = []
  5.  
  6. # Creating an array of users numbers
  7. for i in range(1,num+1):
  8. a = int(input("Enter value" + str(i) + " : "))
  9. storage.append(a) # user enter
  10.  
  11. # Sorting the array
  12. for m in range(len(storage)):
  13. b = min(storage)
  14. storage.remove(b)
  15. result.append(b) # user get
  16. j = ' '.join(str(i) for i in result)
  17. print(j)
Add Comment
Please, Sign In to add comment