Skip to content

Commit e63ac07

Browse files
authored
Update catalan_binomial.py
1 parent 9a1fc8c commit e63ac07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Competitive Coding/Math/Catalan_Numbers/catalan_binomial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ def catalan(n): #Function that finds catalan numbers
1111
c = binCoeff(2*n, n) #Finding value of c by calling the binCoeff function
1212
return c/(n + 1) #This is the final catalan number
1313

14-
for i in range (5): #finds 1st 5 catalan numbers
15-
print (catalan(i)) #Prints the Catalan numbers
14+
if __name__=='__main__':
15+
print "The 10th catalan number is:",catalan(9)

0 commit comments

Comments
 (0)