This commit is contained in:
alstergym
2026-09-21 15:34:58 +02:00
commit fd5a65ab9d
9 changed files with 189 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import numpy as np
random_arr = np.random.randint(1,101,10)
print(random_arr)
sorted = False
while sorted == False:
sorted = True
for index in range(len(random_arr) - 1):
if random_arr[index] > random_arr[index + 1]:
temp = random_arr[index]
random_arr[index] = random_arr[index + 1]
random_arr[index + 1] = temp
sorted = False
print(random_arr)