Math and Coding The computer does not need to be electronic. It could be a person. In the early days of the space program, mathematicians, such as Katherine Johnson, were called computers. Until 1962, electronic computers were not used by the scientists trying to launch John Glenn into space. The calculations Johnson made were done by hand. Johnson, along with other women computers, were portrayed in the 2016 film Hidden Figures, which centered around the space race and the mission that resulted in Glenn being the first American to orbit Earth. A problem closer to home is the calculation of the minimum grade needed on a single test to earn a specific average. If you have already taken several tests, it is easy to find the average of those scores. However, suppose you want to raise your average score. What score do you need on the next test to have a specific average? Write an algorithm to solve this problem: 1. Count how many tests have been taken. 2. Multiply the desired average by one more than the number of tests already taken to find out the total points needed. 3. Add the test scores of the tests already taken to find the total of all points earned so far. 4. Subtract the points earned from the total points needed to find out what still must be scored on the next test. This algorithm will lead you through the process of finding what score you need. Apply the algorithm to find the score. Suppose you have received these grades: 90, 78, 84, 88, 95, and 98. The current average score is 88.8. You would like to raise your average to 90. What do you need on the next test to raise your average to 90? It may seem like as long as you score something over 92 or 93, your average will go up, but that is just a guess. To find the exact score needed, apply the algorithm. 1. There have been six tests taken. 2. 90 × 7 = 630 points are needed for a 90 average. 3. 90 + 78 + 84 + 88 + 95 + 98 = 533 points earned so far. 4. 630 – 533 = 97 is the score required on the next test for a 90 average. You must score 97 on the next test to have an average of 90. Addition, finding averages, and graphing solutions are all algorithms. Graphing the solution set for a linear equation is an algorithm. There are many examples of algorithms for this. Research these algorithms, choose one, and write the steps for graphing the solution set of a linear equation. Apply your algorithm to the linear equation 3X + 2Y = 6. Summarize your algorithm to share with the class. Include an explanation of why you chose the algorithm. Algorithm for Averages Copyright Goodheart-Willcox Co., Inc. 32 32 Introduction In tr od uc ti on to t o Computer Co mp ut er Science: S ci en ce : Coding Co di ng