Skip to content

Instantly share code, notes, and snippets.

@pfreixes
Created March 16, 2020 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfreixes/3fea157dfd018f055ee3c16550a52a06 to your computer and use it in GitHub Desktop.
Save pfreixes/3fea157dfd018f055ee3c16550a52a06 to your computer and use it in GitHub Desktop.
Inferncia del numero de infectats
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