Triton City
Learn to code for secondary and higher education.
Page content (https://dodona.be/en/exercises/457090985/)
Skip to main content Dodona Features Pricing Trinket Exercises Courses User manual Contact Sign in en English Nederlands Toggle navigation Warning! It seems that you are using Dodona within another webpage, so not everything may work properly. Let your teacher know so that he can solve the problem by adjusting a setting in the learning environment. In the meantime, you can click this link to open Dodona in a new window. Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page. Submit Triton City English Dutch Submit Submissions Feedback 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() You can submit as many times as you like. Only your latest submission will be taken into account. To sandbox Sign in to test your solution. Python sandbox This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona. Finalize and submit Description Debugger Test case being debugged © 2026 Dodona Learning Technologies User manual Contact Status Privacy statement Terms and Conditions Your data Publications Dodona 26.06.30-16:42