Welcome to Westonci.ca, your one-stop destination for finding answers to all your questions. Join our expert community now! Connect with professionals on our platform to receive accurate answers to your questions quickly and efficiently. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.
Sagot :
Using the knowledge in computational language in python it is possible to write a code that from a random number draw creates an order of increasing numbers
Writting the code in python:
def shellSort(array, n):
# Rearrange elements at each n/2, n/4, n/8, ... intervals
interval = n // 2
while interval > 0:
for i in range(interval, n):
temp = array[i]
j = i
while j >= interval and array[j - interval] > temp:
array[j] = array[j - interval]
j -= interval
array[j] = temp
interval //= 2
data = [10,9,8,7,6,5,4,3,2,1]
size = len(data)
shellSort(data, size)
print('Sorted Array in Ascending Order:')
print(data)
See more about python at brainly.com/question/18502436
#SPJ1
Thanks for using our platform. We're always here to provide accurate and up-to-date answers to all your queries. We appreciate your time. Please come back anytime for the latest information and answers to your questions. We're dedicated to helping you find the answers you need at Westonci.ca. Don't hesitate to return for more.