1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lesya [120]
3 years ago
6

Descending selection sort with output during execution

Computers and Technology
1 answer:
FromTheMoon [43]3 years ago
3 0

Answer:

Check the explanation

Explanation:

Please find the code down

def selection_sort_descend_trace(numbers):

i=len(numbers)

print("Output: ")

for num in range(0,i-1):# traversing from 0 to N-2, total N-1 iterations

val=numbers[num]

start=num+1

end=i

t=0

for j in range(start,end):

if(val<numbers[j]):

remember=j

val=numbers[j]

t=1

if(t==1):# swaping onlf if greater number is available

temp=numbers[num]

numbers[num]=val

numbers[remember]=temp

for p in range(i):# printing

print(numbers[p],end=' ')

print("\n")

if __name__ == "__main__":

print("Enter the integers separated by space: ")

numbers=[int(x) for x in input().split(' ')]

selection_sort_descend_trace(numbers)

Taking input as string and splitting with space as delimiter , converting the split part to integer , finally append in the list.

You might be interested in
Which is an effect of short-term environmental changes?
allochka39001 [22]
Adaptation or death






.
4 0
2 years ago
Three variables, x, y and z, supposedly hold strings of digits, suitable for converting to integers. Write code that converts th
Gelneren [198K]
The answer is 45boobg
3 0
3 years ago
Read 2 more answers
Electronic components in coputers process data using instructions, which are the steps that tell the computer how to perform a p
Dominik [7]

Answer:

True

Explanation:

  • True, the electronic components perform the tasks that are given to the computer.
  • The computer is made up of nothing but the electronic components like Transistors, Circuits etc.  
  • Electronic components are the building blocks of the computer.
  • So essentially all the tasks performed by the computer are actually performed by the electronic components inside it.
  • So it can be understood that the tasks that are given to the computer are performed by the electronic components. They perform the tasks with the instructions given to the computer.  
  • There also special electronic components designed to read, write and perform the tasks given to the computers.
  • The electronic components comprise of the circuits, transistors, resistors and capacitors.
3 0
3 years ago
Microsoft <br> Excel Module 6
Sonbull [250]

Answer:

what Is your question?

6 0
3 years ago
Which of the following is a feature that is in the Excel program and NOT in Word? (Select all that apply.)
nikklg [1K]
I believe it is workbooks.
5 0
2 years ago
Other questions:
  • You need to put cabling for connecting two new computers in a room, which did not have any network infrastructure. Because of th
    9·2 answers
  • Sarah is entering weekly sales data for week 37 of the current year; however, when she moves down to thecells where she needs to
    8·2 answers
  • Students are studying the effects of beach pollution by counting populations of seagulls at two different beach locations. One l
    7·1 answer
  • Name:
    11·1 answer
  • Drag each tile to the correct box.
    8·1 answer
  • The files in James's computer were found spreading within the device without any human action. As an engineer, you were requeste
    11·1 answer
  • Double clicking the top right corner of a document will
    12·1 answer
  • 23. Convert the following to Megabytes<br> a) 2GB<br> b) 2056 Bytes-
    8·2 answers
  • ________ is a utility program included with most operating systems that allows you to move or eliminate files and give your oper
    14·1 answer
  • What is System Testing
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!