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
mr_godi [17]
2 years ago
13

Write bubblesort algorithm using random programming language

Computers and Technology
2 answers:
melamori03 [73]2 years ago
7 0

Answer:

def bubbleSort( theSeq ):

   n = len( theSeq )

   for i in range( n - 1 ) :

       flag = 0

       for j in range(n - 1) :

           

           if theSeq[j] > theSeq[j + 1] :  

               tmp = theSeq[j]

               theSeq[j] = theSeq[j + 1]

               theSeq[j + 1] = tmp

               flag = 1

       if flag == 0:

           break

   return theSeq

el = [21,6,9,33,3]  

result = bubbleSort(el)

print (result)

maks197457 [2]2 years ago
3 0

Answer:

   n := length(A)

   repeat

       swapped := false

       for i := 1 to n-1 inclusive do

          <em> /* if this pair is out of order */</em>

           if A[i-1] > A[i] then

<em>                /* swap them and remember something changed */</em>

               swap(A[i-1], A[i])

               swapped := true

           end if ⇒

       end for

   until not swapped

end procedure

\\

Explanation:

This is pseudocode

You might be interested in
Heya!!<br><br>•DEFINE DATA SCIENCE??<br>(∩_∩)<br><br>#kavya#<br>​
anastassius [24]

Answer:

Explanation:

Data science defined

Data science encompasses preparing data for analysis, including cleansing, aggregating, and manipulating the data to perform advanced data analysis. Analytic applications and data scientists can then review the results to uncover patterns and enable business leaders to draw informed insights.

5 0
2 years ago
Data stored in computer systems has a high value because there is a great deal of time and effort that goes into creating an ana
Andrew [12]

Answer:

Data often has intrinsic value.

Explanation:

Data stored in computer systems has a high value because there is a great deal of time and effort that goes into creating an analyzing it and data often has intrinsic value.

5 0
3 years ago
TCO 10) Voice packets could experience a significant _____ delay in routers and switches when sharing a network with data traffi
bonufazy [111]

This delay in routers is what we called Packetization delay or also called Accumulation delay. Packetization delay is the time required for the information to pass on the wires. The data rate of the links that passes thru the wires cause the delay.

8 0
2 years ago
What are experts in technology who use their knowledge to break into computers and networks, for profit or just as a challenge k
insens350 [35]

Answer:

Hacker

Explanation:

Hacker -

It refers to the computer software expert , who is responsible to break into the unauthorized networks or computer , is referred to as a hacker .

The hacker is skilled with exceptional computer and computer software knowledge .

Hacking is an illegal practice , as the person is able to access some confidential and personal data and information of any other person or organisation .

Hence , from the given information of the question ,

The correct term is hacker .

3 0
3 years ago
Find a quote that you like. Store the quote in a variable, with an appropriate introduction such as "Ken Thompson once said, 'On
pishuonlain [190]

Answer:

The program to this question as follows:

Program:

quote="You can always edit a bad page. You can’t edit a blank page."

name="Jodi Picoult"

print("Quote:\n",quote)

print ('\t\t\t\t\t\t\t',"Author name-", name)

Output:

Quote:

You can always edit a bad page. You can’t edit a blank page.

       Author name- Jodi Picoult

Explanation:

In the above python code, two variable "quote and name" is defined, in which variable both variable holds some string value.

  • In the next line, the print function is defined, that first print "Quote" as a message, and for line breaking "\n" is used, then print quote variable value.
  • In the last step, first, we use "\t" for line spacing then message "Author name-", and then name variable value.
7 0
3 years ago
Other questions:
  • Two electronics technicians are looking at the testing instrument in the figure above. Technician A says that this instrument is
    7·1 answer
  • How can users create a shortcut to favorite websites and store them in their browser?
    8·2 answers
  • The contents of an array of type ______ can be displayed with the cout operator (without specifying an element). - 1 point(s)
    14·1 answer
  • Select all statements that correctly describe the ramifications of important features supported by modern DBMS.
    15·1 answer
  • Suppose company A wants to develop a program that duplicates the functionality of a programm by company B. Describe how company
    8·1 answer
  • Write a program to calculate the great circle distance between two points on the surface of a sphere. If p1(x1, y1) and p2(x2,y2
    5·1 answer
  • You have been tasked with designing an Ethernet network. Your client needs to implement a very high-speed network backbone betwe
    8·1 answer
  • What is an operating system?<br>​
    11·2 answers
  • Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bu
    13·1 answer
  • In addition to good design sense, what else do web designers need to be proficient in?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!