I Haz Codes
| The code below will generate a list of 2000 numbers randomly. Your task is to sort them into ascending order using bubble sort. | ![]() |
import random
randomNumbers = []
count = 0
while count < 2000:
randomNumbers.append(random.randint(0,10000))
count += 1
In order to do this task you must first research bubble sort to find out how it works.
NOTE – You must not use any inbuilt sorting methods of python. The solution should contain a nested while loop! (or a nested for in loop)
You need to log in or create an account to submit code!
| james-egan | william-soong |
| opage |
Leave a Reply