I’m trying to help my partner calculate the chances of her getting accepted to a program with the following variables.
There are 125 applicants.
80% of applicants are qualified.
The qualified applicants are chosen by lottery.
A total of 18 applicants are chosen.
So, for example, at first she’d have a 1/125*.8 percent chance. Then a 1/124*.8 chance. Then 1/123*.8, etc. until 18 applicants had been accepted.
I’ve just completed the Python Fundamentals I course. I’m trying to set this up using while loops, but I can’t work it all out.
I know there’s an easier way to do this, but I really want to write a code to do it.