Created
April 7, 2022 17:24
-
-
Save poemdexter/1f6437c483a92a35a071976e801c26c2 to your computer and use it in GitHub Desktop.
calculate the percent chance a room of people is covid free
This file contains hidden or 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
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