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]
3 years ago
13

Write bubblesort algorithm using random programming language

Computers and Technology
2 answers:
melamori03 [73]3 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]3 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
2. Which one of the following is not a feature of technology?
Bogdan [553]

Answer:

Answer is C is believe

Explanation:

oi think dont come at me

5 0
3 years ago
What will the output be from the following program?
ser-zykov [4K]

Answer:

3 + 4 hope it helps for you

Explanation:

mark brainest

7 0
3 years ago
Before going into space, astronauts spend many hours training on flight simulators allowing them to learn how to fly without lif
MaRussiya [10]

Answer:

The short answer is, for full-mission flight simulators, specifically by NASA, are built with actual hardware and supported by simulation software. These software take into account every possible scenarios that could be adjusted based on the training. As for the hardware, they receive signals from the software on what they should do.

Explanation:

Some technologies involved are (which are also part of the FAA's requirements):

  1. 6 Degrees of Freedom for motion
  2. Visual systems
  3. Realistic acoustics
  4. Visual effects

This also involves a lot of robotics.

On the topic of motion:

One big and important feature is how motion is simulated - which takes a combined effort of both software and hardware to actually simulate how external forces can also affect the body.

It also takes into account the vibration that is experienced during launch.

The 6 degrees of freedom for motion includes:

  1. Up and down
  2. Left and right - sliding motion
  3. Back and forward
  4. Yaw - turning motion
  5. Pitch - look up and down
  6. Roll

For flight simulators, there are several levels and requirements being used in the aviation training industry. But one thing that you need to know is that the hardware and software mostly take into account motion.

On the topic of visual systems:

The pilots or crew should have a visual representation of what the outside world looks like with at least 150 degrees of view.

Realistic acoustics:

During simulations, actual sounds should also be present based on the real-life sounds produced during flight.

Visual effects:

If the pilot pivots to the right, or is about to breach the exosphere, the system's display should also take that into account and show it to the crew. This also includes visual effects for specific motions being done.

And as a bonus:

Just until recently, everything was analog (meaning, with dials, buttons, and levers) for the actual aircraft simulation that the pilots/astronauts are using. Update are now being made in NASA and SpaceX along with other rocket and spacecraft companies to move from analog to digital (with touch screens).

While this is an abridged version, it should help you to understand the complexities of a flight simulator.

8 0
3 years ago
PASSAGE: The picnic had been scheduled for weeks in advance. The Morris family was looking forward to some fun and relaxation wi
Mekhanik [1.2K]

Answer:

B) The sky began to darken and rumble.

Explanation:

B) The sky began to darken and rumble.

It seems they have arranged it big. Hence, the money is not a problem. Any number of people can be invited,

The problem was certainly that the rain was about to come as sky turned dark and rumble. And hence, this answer as its what created tension.

7 0
3 years ago
Multiple Choice
anygoal [31]

Answer:

cyptographically

Explanation:

Did this question and got it right. Good luck!

6 0
2 years ago
Other questions:
  • Add the following functions to the code:
    9·1 answer
  • What role do you think mobile devices have played in shaping the world?
    13·1 answer
  • Boolean expressions are named after ____
    9·1 answer
  • Kevin manages the security for his company and is working to implement a kernel integrity subsystem for key servers. Of the foll
    9·1 answer
  • In cell n2, enter a formula using the if function and a structured reference to determine if allison simoneau is eligible for tu
    11·1 answer
  • . Which responsibility belongs to the marketing function?
    11·1 answer
  • What time is it NOW??
    11·2 answers
  • I'm in Paris and want to take a picture of my mom in front of the Eifel Tower. I want both her and the tower to be in sharp focu
    14·2 answers
  • Web résumés allow you to include extra graphics and images that you would not include in a traditional résumé. please select the
    9·1 answer
  • while determining which antibiotics are best to treat ulcers caused by helicobacter pylori, the drugs used in the experiment are
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!