The user can input a list of numbers in any order, separated by a comma, into the web application. After inputting their numbers, the user can select which type of statistics they would like to calculate from their list. To calculate the desired statistics, the application utilizes a Switch Statement to determine which formula to apply to the list of numbers.
For this project, we have decided not to use any framework. Instead, we will be using VanillaJS to interact with the Document Object Model by utilizing the document keyword. Let's begin!
For this project, we'll use an input and a button element. The external CSS and JavaScript will be written to support the application.
This quest involves creating mathematical functions such as sum, average, min, max, median, mode, and range. As part of the deliverable requirement, you are expected to code the "mode" function yourself.
Here are the definitions of the mathematical functions:
- Sum: the total addition of all values in a list
- Average: the sum of values in a list divided by the total number of items in the list
- Min: the smallest value in a list of numbers
- Max: the largest value in a list of numbers
- Median: the middle value of a data set when arranged in order from least to greatest
- Mode: the value or values that appear most frequently in a data set
- Range: a measure of the spread or dispersion of a data set, calculated as the difference between the maximum and minimum values in the data set.