7 BIRTHDAY MATCH
Where N = Number of Students in a Class
# N Number of Students in Class
N = 35
mul1 = 1
for x in range(365-N+1,366):
    mul1 = mul1 * x
base = 365
exponent = N
mul2 = pow(base, exponent)
print('Probability of any two share same birthday:',1-(mul1/mul2))
If N=35 then output:
Probability of any two share same birthday: 0.8143832388747152
If N=23 then output:
Probability of any two share same birthday: 0.5072972343239854
If N=40 then output:
Probability of any two share same birthday: 0.891231809817949