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]
4 years ago
6

Descending selection sort with output during execution

Computers and Technology
1 answer:
FromTheMoon [43]4 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
How to plot probability density function on desmos
sertanlavr [38]

Answer:

Explanation:

6 0
3 years ago
5. What would the browser display if the following code were executed in a script?a var product = 0; while ( product &lt;= 25 );
irga5000 [103]

Answer:

An infinite-loop

Explanation:

This is because the condition is always true ie: product is always less than 25. And once there is no sentinel to stop the loop it will run forever.

7 0
3 years ago
A key principle of human-computer interaction (HCI), that states that the appearance of any control should suggest its functiona
kaheart [24]

Answer:

"Affordance" is the correct answer.

Explanation:

  • The performance or properties of such an entity that determines its possible applications which makes it abundantly clear how everything could and should always be used people are sitting or standing on something like a chair as it is very apparent.
  • Users are allowed to experience conceptions without thinking about how to make use of other objects.
4 0
3 years ago
The flowchart that show the sequence of logical operations executed by a computer is called a: A. Systems flowchart B. Operation
Blizzard [7]

Answer:

It is called a Program Flowchart.

Explanation:

5 0
3 years ago
Howard is leading a project to commission a new information system that will be used by a federal government agency. He is worki
Ann [662]

Answer:

The correct answer is A.

Explanation:

Given the example in the question, Howard is at the step of implementing security controls.

There are five official steps for the risk management framework.

  1. Categorizing The Information System: In this step, the IT system's objectives are assigned based on the current mission or project.
  2. Selecting Security Controls: After the risk assesment is done, the security controls for technical, hardware and software problems are decided according to the outcome.
  3. Implementing Security Controls: In this step, the points that were decided in the step before are put into action.
  4. Authorizing The Information System: Authorization for the risk management is approved and monitored.
  5. Monitoring Security Controls: The authorities keep monitoring the process and makes any necessary changes and updates.

The process that is explained in the question is step 3, which is given in option A.

I hope this answer helps.

5 0
3 years ago
Other questions:
  • Which type of energy conversion is an electric generator designed to perform?
    8·1 answer
  • A plain text e-mail and the same text entered into a word processing document would be about the same file sizes.
    5·2 answers
  • If I want to make it look like slide number one is turning a page to slide number two, what effect needs to be applied?
    13·1 answer
  • 5.11 Of these two types of programs:a. I/O-boundb. CPU-boundwhich is more likely to have voluntary context switches, and which i
    9·1 answer
  • If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the capti
    12·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • How many bytes are in a megabyte?
    13·2 answers
  • (1)similarities between backspace key and delete key. (2) different between backspace key and delete key. (3) explain the term e
    10·1 answer
  • 12. Realizar un algoritmo que genere un número aleatorio, el usuario debe adivinar cual es el número generado para esto tendrá 3
    10·1 answer
  • Write a program that prompts the user to enter a month (1-12) and year, then displays the number of days in the month. For examp
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!