a random 10 - letter code is to be formed using the letters a , b , c , d , e , f , g , h , i and i ( only the “ i ” will be used twice ) . what is the probability that a code that has the two i ’ s adjacent to one another will be formed ?
import math
n0 = 10.0
t0 = math.factorial(min(15, int(n0)))
t1 = n0 - 2.0
t2 = n0 - 1.0
t3 = math.factorial(min(15, int(t1)))
t4 = t0 / t3
t5 = t3 * t2
t6 = t4 / 2.0
t7 = t6 * t3
answer = t5 / t7
print(answer)