+ 1

How do I solve this practice exersice? (Python)

PRACTICE EXERCISE Imagine you are a scientist looking at a new type of cell under the microscope. This type of cell divides itself into 2 daughter cells every 24 hours, meaning that the cell population duplicates every day. Task Complete the code to take the initial cell population and the number of days you are observing the cells to calculate the cell population at the end of each day in the following format # take the initial cell population as input cells = int(input()) # take the number of days as input days = int(input()) # initialize the day counter counter = 1 #complete the while loop while : # Daily message print("Day " + str(counter) + ": " +str(cells)) counter = I really don't have good ideas how do I solve it.

25th Nov 2024, 7:36 AM
Sher Chel
Sher Chel - avatar
1 Answer
+ 3
The count of one cell is 2ⁿ after n days. so for one cell: 2š = 2 after 1 day 2² = 4 after 2 days 2³ = 8 after 3 days 2⁴= 16 after 4 days ... now you have more than one cell, so...?
25th Nov 2024, 8:54 AM
Bob_Li
Bob_Li - avatar