

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Exponents
incomplete
2: Exponent Quiz
incomplete
3: Exponents Grow
incomplete
4: Non-Linear Growth
incomplete
5: Logarithms
incomplete
6: Logarithm Quiz
incomplete
7: Factorials
incomplete
8: Factorial Quiz
incomplete
9: Exponential Decay
incomplete
10: Logarithmic Scale
incomplete
11: Mean and Median
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
We're almost done with the math that you'll need for this course! Just one last thing... factorials.
Click to play video
The factorial of a positive integer n, written n!, is the product of all positive integers less than and equal to n.
5! = 5 * 4 * 3 * 2 * 1 = 120
The results of a factorial grow even faster than exponentiation!
n! grows faster than 2^n:
| n! | 2^n | |
|---|---|---|
| 2 | 2 | 4 |
| 3 | 6 | 8 |
| 4 | 24 | 16 |
| 5 | 120 | 32 |
| 6 | 720 | 64 |
Influencers need to be able to schedule posts to be published in the future. We've found that the order in which the posts are published drastically affects their performance.
Complete the num_possible_orders function. It takes the number of posts an influencer has in their backlog as input and returns the total number of possible orders in which we could publish the posts.
Factorials are useful whenever you're trying to count how many ways a collection can be ordered. For example, how many different ways can a deck of cards be arranged?
52 cards.51 remaining cards.50 remaining cards, and so on.That means the total number of possibilities is the 52 options multiplied by 51 options multiplied then by 50 options, and so on.
52 * 51 * 50 ... * 2 * 1
Or in other words, the number of possible combinations for a deck of cards is 52!, or 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000 (I didn't count the zeros but I think this is correct).