We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a1fc8c commit e63ac07Copy full SHA for e63ac07
Competitive Coding/Math/Catalan_Numbers/catalan_binomial.py
@@ -11,5 +11,5 @@ def catalan(n): #Function that finds catalan numbers
11
c = binCoeff(2*n, n) #Finding value of c by calling the binCoeff function
12
return c/(n + 1) #This is the final catalan number
13
14
-for i in range (5): #finds 1st 5 catalan numbers
15
- print (catalan(i)) #Prints the Catalan numbers
+if __name__=='__main__':
+ print "The 10th catalan number is:",catalan(9)
0 commit comments