This course is archived · This course is now in read-only mode. You can’t register or make new submissions anymore, but your previous work and results are still available.

Sign in to test your solution.
def factorial(n): """ Computes the factorial of n. >>> factorial(10) 3628800 >>> factorial(32) 263130836933693530167218012160000000 """ def binomial(n, k): """ Computes the bionomial coefficient index by n and k. >>> binomial(7, 3) 35 >>> binomial(12, 4) 495 """ def triangular(n): """ Computes the n-th triangular number. >>> triangular(10) 55 >>> triangular(32) 528 """ def tetrahedral(n): """ Computes the n-th tetrahedral number. >>> tetrahedral(10) 220 >>> tetrahedral(32) 5984 """ if __name__ == '__main__': import doctest doctest.testmod()