Fundamentals: Math Primer Flashcards
What is using n as a Variable in Math
When we describe problems, we might want to say, “any number of things.”
For example, we might be building an email webapp, and we want to say, “An email can have any number of recipients… It can have 1 recipient, 3, 13, or 50 recipients.”
It would be annoying if we always had to say that an email might have 1, 3, 13, etc., recipients. Instead, we can use a variable to talk about this unknown number.
We can imagine a variable n as the name of a variable that holds any number. Then we could say that the email has n recipients.
We could also use variable names x, y, tacocat, or whatever is most appropriate in the situation, but n is a good default.
Examples of using n:
"We have a bug with sending emails. If every email has one sender and n recipients, let's check if one or n emails were sent." "Our feature is good at sending emails to n recipients when n is 1-99, but have we checked if our feature works when n is zero?
What are Coordinate Planes?
A coordinate plane is a representation of a two-dimensional space.
Coordinate planes help us solve problems where we need to consider points that have a location in a 2D space.
2D space means that we define locations with two axes that cross each other. These two axes are typically named x and y.
If you’ve seen certain kinds of bar graphs or line graphs, and there’s a horizontal x-axis, and a vertical y-axis, this is the exact same concept.
What are Maximum and Minimum?
The maximum value in a list of numbers is the largest value in the list.
The minimum value in a list of numbers is the smallest value in the list. Example: In this list [21, 4, 9, 20, 17, 42, 13, 8], the maximum value is 42 and the minimum value is 4.
Sorting
Sorting is the action of arranging a list of items following a certain logical pattern. We can sort a list of objects in ascending or descending order.When the objects are ordered from lowest value to highest value, the sorting order is said to be in ascending order. In our example, that would be 4, 8, 9, 13, 17, 20, 21, 42.
When the objects are ordered from highest value to lowest value, the sorting order is said to be in descending order. In our example, that would be 42, 21, 20, 17, 13, 9, 8, 4.
Anything that we can give a numerical value to can be sorted, even words. The way to assign values to every word of every writing system is a very complex topic! As a smaller example, we can take the English alphabet, and say that A is 1, B is 2, and so on down the line, to Z being 26. This gives us enough information to think about sorting a list of words.
What is the Average or Mean?
The average or mean of a collection of numbers is the sum of the numbers divided by the total count of numbers.
“Average” and “mean” are synonymous.
For example, given the list [42, 14, 73, 5, 10] Sum of the numbers: 144 Total count of numbers: 5 Sum / Total count: 144 / 5 Average or mean: 28.8
Floor and Ceiling Functions
Given any number n…
The floor of n, written ⌊n⌋, is the biggest integer less than or equal to n The ceiling of n, written ⌈n⌉, is the smallest integer greater than or equal to n