We are going to continue practicing scripting by updating the JavaScript file that we have created...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
We are going to continue practicing scripting by updating the JavaScript file that we have created from Self-study 3 JavaScript through the practical exercise called, "Coding Challenge 1 Who is the winner?". Coding Challenge 1 Task 1 There is a new rule to add that the winner must have a score greater than or equal to 100 points. Otherwise, there is no winner for a trophy. 2nd 3rd 4th 112 102 100 107 99 Team 1st Kangaroo 98 Gumtree 110 96 96 Team 1st 2nd 3rd 4th Kangaroo 97 109 89 90 Gumtree 89 92 92 111 There are two gymnastics teams, Kangaroos and Gumtree. They compete against each other 4 times. The winner with the highest average wins a trophy. Task 1 1) Calculate the average score for each team using the data below. 2) Compare the team's average scores to determine the winner of the competition and print it with an alert message. You need to include the condition of draw as well. Team Kangaroo Gumtree 1st 97 2nd 109 89 92 3rd 89 92 92 4th 90 111 Task 2 Now, they introduced a new rule to determine the winner. A team wins only if it has a higher score than the other team, AND the average score must be at least 100 points. You may try different conditions. Team 1st 2nd 3rd 4th Kangaroo 98 113 102 100 Gumtree 109 96 124 98 We are going to continue practicing scripting by updating the JavaScript file that we have created from Self-study 3 JavaScript through the practical exercise called, "Coding Challenge 1 Who is the winner?". Coding Challenge 1 Task 1 There is a new rule to add that the winner must have a score greater than or equal to 100 points. Otherwise, there is no winner for a trophy. 2nd 3rd 4th 112 102 100 107 99 Team 1st Kangaroo 98 Gumtree 110 96 96 Team 1st 2nd 3rd 4th Kangaroo 97 109 89 90 Gumtree 89 92 92 111 There are two gymnastics teams, Kangaroos and Gumtree. They compete against each other 4 times. The winner with the highest average wins a trophy. Task 1 1) Calculate the average score for each team using the data below. 2) Compare the team's average scores to determine the winner of the competition and print it with an alert message. You need to include the condition of draw as well. Team Kangaroo Gumtree 1st 97 2nd 109 89 92 3rd 89 92 92 4th 90 111 Task 2 Now, they introduced a new rule to determine the winner. A team wins only if it has a higher score than the other team, AND the average score must be at least 100 points. You may try different conditions. Team 1st 2nd 3rd 4th Kangaroo 98 113 102 100 Gumtree 109 96 124 98
Expert Answer:
Answer rating: 100% (QA)
To tackle this coding challenge you can follow these steps Calculate the average score for each team ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
Find the extreme values of (x, y) = x 2 + 2y 2 subject to the constraint g(x, y) = 4x 6y = 25. (a) Show that the Lagrange equations yield 2x = 42, 4y = -62. (b) Show that if x = 0 or y = 0, then the...
-
In a study by A. Elliot et al., titled "Women's Use of Red Clothing as a Sexual Signal in Intersexual Interaction" (Journal of Experimental Social Psychology, Vol. 49, Issue 3, pp. 599-602), women...
-
The current spot exchange rate is RM5.76/ and the three-month forward rate is RM5.70/. Based on your analysis of the exchange rate, you are pretty confident that the spot exchange rate will be...
-
At a given location, under normal conditions a river flows with a Manning coefficient of 0.030 , and a cross section as indicated in Fig. P10.47a. During flood conditions at this location, the river...
-
Roberta is an accountant employed by a local firm. During the year, Roberta incurs the following unreimbursed expenses: Item Amount Travel to client locations . $750 Subscriptions to professional...
-
Write a MIPS assembly code with minimum possible assembly instructions for the following C++.. Assume that the variables num1, num2 and num3 are already saved in some MIPS registers. if (x > 0 && y...
-
Bill and Kate Theil are not only husband and wife but entrepreneurs who have established three successful businesses. The proposed plan for their latest effort involves a series of international...
-
1. A recent study reports that the average time spent online is 7 hours per day. (a) What is the probability that time spent online tomorrow will exceed 12 hours? (4%) (b) If the variance of time...
-
When a Servlet is created, the init() method is called to do the initialization for the Web server. (True/False)
-
List five steps to build a data query from a Java database application project to a relational database using the Java runtime object method.
-
Explain why a complete ban on plastic bags would be inefficient. Plans to curtail use of plastic bags, but not much action Last summer, Seattle approved a 20-cents charge on plastic shopping bags,...
-
One can run and test any Oracle package with a stored procedure directly in the Oracle SQL Developer environment. (True/False)
-
Explain how Chinas price controls have changed consumer surplus, producer surplus, total surplus, and the deadweight loss in the markets for coal, gasoline, and diesel. Chinese power plants have run...
-
A number of studies document that a relationship exists between macroeconomic variables and equity market returns. Furthermore, studies concerning multifactor models frequently incorporate...
-
A copper wire (density = 8.96 g/cm 3 ) has a diameter of 0.25 mm. If a sample of this copper wire has a mass of 22 g, how long is the wire?
-
The reaction A + B C + D is carried out adiabatically in a series of staged packed-bed reactors with interstage cooling. The lowest temperature to which the reactant stream may be cooled is 27C. The...
-
The thermal decomposition of isopropyl isocyanate was studied in a differential packed-bed reactor. From the data in Table P7-12A, determine the reactionrate-law parameters. TABLE P7-12A RAW DATA Run...
-
The following oxygen-18 data were obtained from soil samples taken at different depths in Ontario, Canada. Assuming that all the 18O was laid down during the last glacial age and that the transport...
-
(a) During a certain day the outdoor temperature ranges between \(60^{\circ} \mathrm{F}\) and \(80^{\circ} \mathrm{F}\). What is the corresponding range in degrees Celsius and in kelvins? (b) The...
-
Which is greater in each pair: (a) the thermal energy of a pool of water or that of a glass of water at the same temperature, (b) the heat capacity of a pool of water or that of a glass of water at...
-
Which of the following systems undergo a quasistatic process? (a) A gas-containing balloon is popped inside a vacuum container. System: container, gas, and balloon. (b) A cup of coffee cools down....
Study smarter with the SolutionInn App