Skip to content

Instantly share code, notes, and snippets.

@poemdexter
Created April 7, 2022 17:24
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 poemdexter/1f6437c483a92a35a071976e801c26c2 to your computer and use it in GitHub Desktop.
Save poemdexter/1f6437c483a92a35a071976e801c26c2 to your computer and use it in GitHub Desktop.
calculate the percent chance a room of people is covid free
d = float(raw_input("daily cases per 100k: "))
u = float(raw_input("percentage unreported: "))
i = int(raw_input("days of infectious period: "))
c = int(raw_input("amount of people in room: "))
p = 1 (((d + (d * (u / 100))) * i) / 100000)
chance = (p ** c) * 100
print("percent chance a room of " + str(c) + " is covid free: " + str(chance))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment