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
Sedaia [141]
3 years ago
15

Students in a class are asked to stand in ascending order according to their heights for the annual class photograph. Determine

the number of students not currently standing in their correct positions.Students in a class are asked to stand in ascending order according to their heights for the annual class photograph. Determine the number of students not currently standing in their correct positions.
Mathematics
1 answer:
horrorfan [7]3 years ago
4 0

Answer:

The function in Python is as follows:

def heightChecker(heights):

   expected = []

   count = 0

   for i in range(len(heights)):

       expected.append(heights[i])      

   expected.sort()

   for i in range(len(heights)):

       if expected[i] != heights[i]:

           count+=1  

   return count

Step-by-step explanation:

Required

Function to return the number of out of position students

<em>See comment for complete question</em>

This defines the function. It receives the heights as a parameter, from the main

def heightChecker(heights):

This initializes a list, (expected list)

   expected = []

This initializes the count of out of position students

   count = 0

This iterates through the original list

   for i in range(len(heights)):

The list item is then appended to the expected list

       expected.append(heights[i])      

This sorts the expected list in ascending order

   expected.sort()

This iterates through the original and the expected lists

   for i in range(len(heights)):

If list elements at the same index are not the same, count is incremented by 1

<em>        if expected[i] != heights[i]: </em>

<em>            count+=1  </em>

This returns count

   return count

You might be interested in
17) BRAINLIEST + 15+ POINTS :D
Alex Ar [27]

30 miles per hour

or, 30 miles per 60 minutes        /:30

=> 1 mile per  2 minutes

50 miles => 2*50 minutes=100 minutes

100 minutes=60minutes+40minutes=An hour and 40 minutes

6 0
3 years ago
Read 2 more answers
Add parentheses to make the statement true: 20 ÷ 5 x 2 + 3 = 5
vagabundo [1.1K]
Add parentheses around the ( 2 + 3 )
3 0
3 years ago
Read 2 more answers
3) Find the volume of this solid: *<br> cm<br> 2 cm
pentagon [3]

Answer:

what solid??????

Step-by-step explanation:

3 0
4 years ago
The amount of chlorine in a swimming pool is proportional to the volume of water. The pool has 2.5 milligrams of chlorine per li
stira [4]

Answer:

There are <u>20,000 milligrams</u> chlorine in the pool.

Step-by-step explanation:

Given:

The chlorine per liter of water in the pool is 2.5 milligrams.

The  volume of water in the swimming pool is 8000 gallons.

Now, to find the quantity of chlorine in the pool.

Let the quantity of chlorine be x.

The gallons of water in the swimming pool = 8000.

The milligrams of chlorine per liter of water in the pool = 2.5.

According to question, the amount of chlorine in the swimming pool is proportional to the volume of water.

So, 2.5 mg of chlorine is equivalent to 1 liter.

Thus, x is equivalent to 8000.

Now, to get the quantity of chlorine by using cross multiplication method:

\frac{2.5}{1} =\frac{x}{8000}

<em>By cross multiplying we get:</em>

20000=x\\\\x=20,000\ mg.

Therefore, there are 20,000 milligram chlorine in the pool.

6 0
3 years ago
Help me fill this out thanks
irga5000 [103]

Answer:

y = 2 \sqrt{6}

Step-by-step explanation:

\frac{y}{ \sin(60) }  =  \frac{4 \sqrt{2} }{ \sin(90) }  \\  \frac{y}{ \frac{1}{2} \sqrt{3}  }  =  \frac{4 \sqrt{2} }{1}  \\ y = 4 \sqrt{2} \times  \frac{1}{2}   \sqrt{3}  \\ y = 2 \sqrt{6}

6 0
3 years ago
Other questions:
  • 1.4t-0.4(t-3.1)=5.8 please help !!
    9·1 answer
  • a test has 40 questions. denise finished 2/5 of the questions in the first 10 minutes and 1/2 of the remaining questions in the
    6·1 answer
  • 1. Round this number to the nearest hundred.
    5·1 answer
  • Can someone help with me with this. Thank you
    6·1 answer
  • If 4 pounds of potatoes costs $6.78. How much does 1 pound of potatoes cost? Show all your work!
    6·1 answer
  • A store sold 722 shoes last year. This year the store sold 540 shoes. What is the percent decrease in the number of shoes sold f
    14·2 answers
  • I need to find x thank you
    13·2 answers
  • PLEASE HELP ME *begs*
    12·2 answers
  • QUICK !!! FAST 15 POINTS <br> I NEED HELP!!!!!
    9·2 answers
  • Thank you in advance:) <br><br> which parent function?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!