[VISIBLE ONLY LOCALLY] Optionally view what the website will look like at another time (in PDT):
Credit: Lisa Yan
You are looking to get TikTok viral on Planet Earth! Write a program that takes two things as input: (1) a target view count, and (2) a growth rate. Your program will then compute the number of days it takes you to reach your target viewer count, like below (user input highlighted in blue):
An example with (1) view count as 100 and (2) growth rate as 3.
Every day, your total view count multiples by the above growth rate. In the above example, your exponential growth rate is 3, meaning:
... and so on.
Try out your program in
This pattern of growth is called an exponential growth rate and is a mathematical function used to describe viral video viewcounts, money investments, spread of diseases, and more. Some examples: