Question: Create a JavaScript file (link it to an HTML file), and write code for Part A, B and C: A. Lucas and John are trying

Create a JavaScript file (link it to an HTML file), and write code for Part A, B and C: A. Lucas and John are trying to compare their BMI (Body Mass Index), which is calculated using the formula: 2 = mass / (height * height) (mass in kg BMI = mass / height ** and height in meter). Your tasks: 1. Store Lucas's and John's mass and height in variables 2. Calculate both their BMls using the formula (you can even implement both versions) 3. Create a Boolean variable 'lucasHigherBMI' containing information about whether Lucas has a higher BMI than John. Test data: Data 1: Lucas weights 78 kg and is 1.69 m tall. John weights 92 kg and is 1.95m tall. Data 2: Lucas weights 95 kg and is 1.88 m tall. John weights 85 kg and is 1.76m tall. B. The Temperature Converter - Let's make a converter based on the steps here and display the coverted result. -Use template literals Only to display the result Store a celsius temperature into a variable. Convert it to fahrenheit and output "NNC is NNF". Now store a fahrenheit temperature into a variable. Convert it to celsius and output "NNF is NNC." C. There are two teams, Nets and Knicks. They compete against each other 3 times. The team with the highest average score wins a trophy! Your tasks: 1. Calculate the average score for each team, using the test data below 2. Compare the team's average scores to determine the winner of the competition, and print it to the console. Don't forget that there can be a draw, so test for that as well(draw means they have the same average score) 3. Bonus 1: Include a requirement for a minimum score of 100. With this rule, a team only wins if it has a higher score than the other team, and the same time a score of at least 100 points.Hint: Use a logical operator to test for minimum score, as well as multiple else -if blocks. 4. Bonus 2: Minimum score also applies to a draw! So a draw only happens when both teams have the same score and both have a score greater or equal 100 points. Otherwise, no team wins the trophy . Test data: Data 1: Nets score 96, 108 and 89. Knicks score 88,91 and 110 Data Bonus 1: Nets score 97, 112 and 101. Knicks score 109, 95 and 123 Data Bonus 2: Nets score 97, 112 and 101. Knicks score 109, 95 and 106
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
