Can you help me on Growing Bacteria? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you help me on Growing Bacteria?

A bacteria culture starts with 500 bacteria and doubles in size every hour. Which means that after 1 hour the number of bacteria is 1000, after 2 hours, 2000, and so on. Calculate and output the number of bacteria that will be in the culture after 24 hours. The formula to calculate the bacteria after N hours will be: 500*2ᴺ. Here is my attempt: print(500**1000**2000) (500**1000**2000)

11th Nov 2021, 9:15 AM
Shah Johan
4 Answers
+ 2
The formula to calculate the bacteria after N hours will be: 500*2ᴺ. 500*2**24
11th Nov 2021, 10:33 AM
MATOVU CALEB
MATOVU CALEB - avatar
+ 1
Here is a hint. How about. 2**3*3. The question requires exponation. The question says in an hour there are 1000. Then how about 24. And they have given u the formula. To use (500**5*2) change some parts in the formula in parenthesis
11th Nov 2021, 9:34 AM
MATOVU CALEB
MATOVU CALEB - avatar
0
Hey Matovu,i tried your hint with 500**1*2 but it didn't work
11th Nov 2021, 10:07 AM
Shah Johan
0
Try this print (500*2**24)
12th Nov 2021, 10:17 PM
Davidson
Davidson - avatar