r/pythonhelp • • Mar 12 '21

HOMEWORK What do I do in this homework problem?

6 Upvotes

6 comments sorted by

2

u/[deleted] Mar 12 '21

[removed] — view removed comment

2

u/MT1961 Mar 12 '21

It is a population growth problem. It really has nothing specifically to do with Python, you can read the formula here:

Population Growth Calculator - Calculator Academy

Essentially, it is x(t) = x0 × (1 + r) t
Where x0 is the current population, r is the rate of growth, and t is the number of years/days (in your case). If you plug those numbers into the calculator on the link, you'll see it go from 2 to 2.6 and so forth. Your job is simply to implement that function and call it in a loop for the number of days requested.