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
What is 4.583.269 rounded to the nearest hundredth
Ede4ka [16]

4,583.27 is 4,583.269 rounded to the nearest hundredth



3 0
3 years ago
PLEASE HELP ASAP BRAINLIEST
Pachacha [2.7K]

Hi there!

The term "difference" os the result of subtracting one number from another.

So in other terms you want to know what would be the result of subtracting -4.6 from 13.5 :

13.5 - -4.6 = Difference between the two temperatures


Two minus signs turn into a positive sign so :

13.5 - -4.6 =

13.5 + 4.6 =

18.1 = Difference between the two temperatures


Your answer is : The difference between the two temperatures is 18.1


There you go! I really hope this helped, if there's anything just let me know! :)

3 0
3 years ago
Jane estimates this product by computing 7 x 800.
nirvana33 [79]

Answer:

Bill is closer.

Step-by-step explanation:

Bill: 7 * 900 = 6,300

Jane:  7 * 800 = 5,600

Actual Answer: 7 * 876 = 6,132

5 0
4 years ago
Lainey bought a set of 20 markers for $6<br> What is the cost of 111 marker?
sammy [17]

Answer:

370

Step-by-step explanation:

First find the unit rate aka price per pencil: 20 divided by 6 equals 3.333

Then find amount for all pencils

3.333 by 111 is 369.963

Then we round up to have a realistic amount of pencils to 370

5 0
3 years ago
Annie took a total of 24 quizzes over the course of 3 weeks. How many weeks of school will Annie have to attend this quarter bef
Evgen [1.6K]

Answer: 10 Weeks

Step-by-step explanation:

24 - 3

divide both by 3

8 - 1

multiply both by 10

80 - 10

3 0
3 years ago
Other questions:
  • Find the GCF of each pair 20 and 36
    7·1 answer
  • Among all pairs of numbers with a sum 57 find the pair whose product is maximum
    8·1 answer
  • How many fractions are equivalent to 4/5?
    10·1 answer
  • What’s 6 I don’t get it need answers fast and 7 can anyone help?!
    15·1 answer
  • If a figure is dilated by a scale factor less than one, does the shape get larger or smaller?
    13·2 answers
  • The number of students who passed on the math exam was three-fourths of the total number of students who failed.
    10·1 answer
  • Please can someone solve this question?
    15·1 answer
  • What is the value of x in the following equation?<br> 2 (x - 4) + 15 = 21
    14·1 answer
  • Pression<br> Evaluate the expression -0.4(3x - 2) + 2 + 4 for x=4
    11·1 answer
  • What coordinates on the unit circle are associated with the angle measure?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!