

n = input("Give the degrees of freedom  n=");

#a
chi2cdf(0,n);

1-chi2cdf(0,n);

#b

chi2cdf(1,n)-chi2cdf(-1,n);

1-(chi2cdf(1,n)-chi2cdf(-1,n));

#c+d

a = input("Give a number between 0 and 1 a=");
b = input("Give a number between 0 and 1 b=");

chi2inv(a,n)

chi2inv(1-b,n)
