Due: October 15, 2025
Points: 25
In the given examples, what you type is in red and the program prints what is in black. Your program output should look exactly like the output in the examples, except that what you type won’t be in red, and the results may differ in the last few digits.
To turn in: Please turn in the program in the file siloop.py.
Example:
Number of days: 10
1 0.0012211323960795992
2 0.00149109134209279
3 0.0018206220327889482
4 0.0022228167755574827
5 0.0027136190661283567
6 0.0033124316939081035
7 0.00404284825698398
8 0.004933530020258307
9 0.006019252361985584
10 0.007342146711703001
To turn in: Please turn in the program in the file siupto.py.
Examples:
Proportion of population (between 0 and 1, non-inclusive): 0.5
In 35 days, at least 0.5 of the population will be infected
The actual proportion will be 0.5232944296657519
Proportion of population (between 0 and 1, non-inclusive): 0.25
In 30 days, at least 0.25 of the population will be infected
The actual proportion will be 0.287664368675717
Proportion of population (between 0 and 1, non-inclusive): 1
You must enter a decimal fraction between 0 and 1, non-inclusive!
Proportion of population (between 0 and 1, non-inclusive): 3/4
You must enter the proportion as a decimal fraction between 0 and 1 non-inclusive
|
MHI 289I, Programming in Health Informatics Version of October 1, 2025 at 2:55PM
|
You can also obtain a PDF version of this. |