Make a website based on this description and store it in the q1 folder. The file should
Fantastic news! We've Found the answer you've been seeking!
Question:
Make a website based on this description and store it in the "q1" folder. The file should be named "index.html".
- Make the title of this page: "(Your Name)'s Number Examination Tool".
- Add necessary html documentation using comments. Make sure that you include your name, class number, section number, and the date.
- Ask the user to enter values via a prompt until the user enters -1.
- If the user enters a non-numerical value, such as "Fido", skip that value.
- For this problem, I want you to use a while loop that loops while true. If the user enters -1, break out of the loop.
- Once the user enters -1, report the following:
- For each number, report if it is an even number, odd number, or a floating-point number.
- At the end, report the total and the average of all numbers. (If there are none, write "No values were entered.")
- At the end, report the total and the average of just the floating-point numbers. (If there are none, write "No floating-point values were entered.")
- All values displayed to the screen should be rounded to 2 decimal places using the toFixed function.
Here's an example run: 8, 6, 3.75, 7, 5, 4.28, 0, 9, 10.92, -1. The sequence should always end with -1 and the -1 should never be included with the actual data. Here was my result.
- 8 is an even value.
- 6 is an even value.
- 3.75 is a floating-point value.
- 7 is an odd value.
- 5 is an odd value.
- 4.28 is a floating-point value.
- 0 is an even value.
- 9 is an odd value.
- 10.92 is a floating-point value.
- Final Message after all numbers have been entered: The total is 53.95 and the average is 5.99. The sum of just the floating point values is 18.95 with an average of 6.32.
Posted Date: