subject

Write a PYTHON program to sort a list of numbers(get the list as input) using selection sort and bubble sort. Selection sort (5 points)

Pseudo Code: (Each line of pseudo-code converts to one line of code)

Loop from the first element of the list to (n-1 )th element(i)

Store the minimum index as i

Loop from the second element to nth element (j)

Compare the min index element and the current loop element(j)

If the current element is less than the min index

Store this index as the min index

#At the end of this inner loop’s first run the min index will be holding the index value of the smallest item in the list

Swap the ith element with the min index element

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 24.06.2019 00:20
The guy wire bd exerts on the telephone pole ac a force p directed along bd. knowing the p must have a 720-n component perpendicular to the pole ac, determine the magnitude of force p and its component along line ac.
Answers: 2
question
Computers and Technology, 24.06.2019 20:00
Which element will you include to present numerical on a slide? a: graph b: text c: flowchart d: shapes
Answers: 1
question
Computers and Technology, 25.06.2019 08:10
The __ is the section of a cpu core that performs arthimetic involving integers and logical operations
Answers: 2
You know the right answer?
Write a PYTHON program to sort a list of numbers(get the list as input) using selection sort and bub...
Questions
question
Mathematics, 23.04.2021 14:00
question
Health, 23.04.2021 14:00
question
Mathematics, 23.04.2021 14:00
question
Mathematics, 23.04.2021 14:00
question
History, 23.04.2021 14:00
question
Biology, 23.04.2021 14:00
question
Mathematics, 23.04.2021 14:00
question
Chemistry, 23.04.2021 14:00
question
Mathematics, 23.04.2021 14:00
Questions on the website: 13722362