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
Consider the following classes:
aleksandrvk [35]

Answer:

The answer is toy

Explanation:

I think toy is the odd one out

4 0
3 years ago
A process at Host C receiving two incoming UDP segments from two different hosts will know that they originated from two differe
larisa86 [58]

Answer: True

Explanation:

Each connection socket is identified with a four‐

tuple: (source IP address, source port number, destination IP address,

destination port number). When host C receives a segment, it

examines the segment and the operating system will provide the process with the IP address.

7 0
3 years ago
Read 2 more answers
A typical analog cell phone has a frequency of 850 mhz; a digital phone a frequency of 1950 mhz. compared to the signal from an
Zepler [3.9K]
A higher frequency than the analog cell phone.
5 0
3 years ago
As Juan sat in his biology lab, his instructor was droning on about the techniques of vivisection. Juan kept thinking about the
MaRussiya [10]

Answer:

attending

Explanation:

7 0
3 years ago
Which plan includes procedures and processes that ensure the smooth functioning of the business even after a disaster?
mamaluj [8]

Answer:

The plan that includes procedures and processes that ensure the smooth functioning of the business even after a disaster is the:

business continuity and disaster recovery plan.

Explanation:

An entity that has good business continuity and disaster recovery plan maintains its full operational activities and processes after a business disaster.   After the business disaster, the entity may even grow bigger, because it has identified critical functions and their dependencies for continued growth.  While the period is a time of recovery, for business entities that are well-prepared, the recovery period offers a unique opportunity for innovation and rapid recovery and development on all fours: organization, processes, people, and performance.

8 0
2 years ago
Read 2 more answers
Other questions:
  • An essential skill today is knowing how to cite sources properly. Creative Commons has a system of licenses and tools for creato
    11·1 answer
  • Design a new Triangle class that extends the abstract
    13·1 answer
  • A(n) ____ is the computer counterpart to an ordinary paper file you might keep in a file cabinet or an accounting ledger.a. data
    6·1 answer
  • What tasks do most operating systems perform?
    15·1 answer
  • Suppose that a is a one-dimensional array of ints with a length of at least 2. Which of the following code fragments successfull
    8·1 answer
  • Write a small program that takes in two numbers from the user. Using an if statement and an else statement, compare them and tel
    12·1 answer
  • What are some other possible causes of an overheating laptop
    7·1 answer
  • Identify and explain groups that may be impacted by nanotechnology.
    13·1 answer
  • Select the correct answer. Which step references adding color, size, and media format in your digital portfolio? A. identifying
    6·1 answer
  • Write the icon of full justification​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!