# Arup Guha
# 6/11/2018
# Calculates Probability that some 2 people in a room of n people
# share a birthday, assuming each of 365 birthdays is equally likely.

# Number of days in a year.
DAYS_IN_YEAR = 365

# Number of people in the Intro Session for 2018 SI@UCF
NUM_PEOPLE = 38

# Calculate the probability that NUMPEOPLE in a row all have unique
# birthdays, after i people have gone
probDiff = 1
for i in range(1,NUM_PEOPLE):
    probDiff *= (DAYS_IN_YEAR-i)/DAYS_IN_YEAR

# The probability at least one pair has the same birthday
probSamePair = 1 - probDiff

# Output the result.
print("Percentage chance some two people have the same bday =",100*probSamePair)
