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.

reeks 05: functies 0 of 6 activities solved
  1. ISBN Not yet solved
  2. Triton City Not yet solved
  3. Pizzino Not yet solved
  4. Rövarspråket Not yet solved
  5. Pangrammatic window Not yet solved
  6. Recombination Not yet solved
Next series reeks 06: lijsten en tuples
reeks 05: functies

Triton City

This course is archived, so you can no longer hand in solutions.

def factorial(n): """ Computes the factorial of n. >>> factorial(10) 3628800 >>> factorial(32) 263130836933693530167218012160000000 """ def binomial(n, k): """ Computes the binomial 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()