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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
Which is a false statement considering copyright law? a. when people upload something to the internet they automatically receive a copyright for the work b. the work does not have to contain a copyright notice to be considered having a copyright c. copyright is legal term describing rights given to the creators for literary and artistic works d. personal pictures are always covered by copyrights
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
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
English, 27.01.2021 19:10
question
Health, 27.01.2021 19:10
question
Mathematics, 27.01.2021 19:10
question
Mathematics, 27.01.2021 19:10
Questions on the website: 13722363