Question: why is it not working for ans = num_doublings(27, 28) print(ans) how do make it work for all :) the population to go from a

 why is it not working for ans = num_doublings(27, 28) print(ans)

why is it not working for

ans = num_doublings(27, 28)

print(ans)

how do make it work for all :)

the population to go from a given initial size to a value greater than or equal ta a given final size. The answer should be zero if the final population is less than or equal to the initial population. Note: Your function must use a while laap, not a mathematical farmula far the result. For example: \begin{tabular}{|l|l|} \hline Test & Result \\ \hline ans = nun_doublings( (1,8) & 3 \\ print(ans) & \\ \hline \end{tabular} Answer: (penalty regime: 0% ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ef num_doublinas(initial_nooulation, final_pooulation): num_numedoublina' if final_population c- initial_population: number return nutber count = b initial_population =1 while initial_population \& final_population: initial_population = initial_population 2 caunt +=1 return count Seratehpad 21ans=numdoublinas(27,28)print(ans) Prefix with Answer One or more hidden tests failed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!