Created
March 16, 2020 21:23
-
-
Save pfreixes/3fea157dfd018f055ee3c16550a52a06 to your computer and use it in GitHub Desktop.
Inferncia del numero de infectats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TAXA_DE_MULTIPLICACIO = 3 | |
PERCENTATGE_DE_HOSPITALITZATS = 20 | |
casos_reportats = [18, 28, 32, 45, 48, 77, 100, 124, 181, 319, 509, 715, 903, 1394] | |
casos_reals = casos_reportats[0] | |
for i in range(1, len(casos_reportats)): | |
casos_reals += ((casos_reportats[i] - casos_reportats[i-1]) * 100 / PERCENTATGE_DE_HOSPITALITZATS) * TAXA_DE_MULTIPLICACIO | |
print(casos_reals) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment