Put in any real number in any order :) And no, I'm not removing the intro >:D I need to sleep
A project for "Advanced Algebra 2018-2019" To find the mean, I take all the numbers and I divide it by the number of numbers. To find the median, I copy the list to another list. I use a bubble-sort algorithm to sort the copied list smallest to greatest. Then, if the number of numbers is divisible by two, I take the average of the middle two numbers. If not I take the middle number. Mode was more of a challenge than I thought. Using the same copied list, I make another list to find the number of times an item appeared. exp: Copied and sorted list: {1, 1, 1, 2, 2, 3, 4, 5} New list: {1, 2, 3, 1, 2, 1, 1, 1} See the pattern? If the average of the new list is 1, there is no mode? I find the max of the new list and the item number will be the mode. Copied and sorted list: {1, 1, ---1---, 2, 2, 3, 4, 5} New list: {1, 2, ---3---, 1, 2, 1, 1, 1} 1, in this set of values is the mode. It can also take multiple modes. exp: Copied and sorted list: {1, ---1---, 2, ---2---, 3, ---3---, 5, ---5---} New list{1, ---2---, 1, ---2---, 1, ---2---, 1, ---2---} The max is 2 and the numbers of the items are; 2, 4, 6, 8. 2 in the sorted list is 1, 4 is 2, 6 is 3 and 8 is 5. The variable "mode" is then set to the string: "1, 2, 3, 5." I doubt you read and understand at this point but lol.