Lah numbers: Difference between revisions
→{{header|Python}}: Python 2 -> Python 3; use functions from built-in math module
(Realize in F#) |
(→{{header|Python}}: Python 2 -> Python 3; use functions from built-in math module) |
||
Line 1,590:
=={{header|Python}}==
<syntaxhighlight lang="python">
def lah(n, k):
if k == 1:
return factorial(n)
Line 1,608 ⟶ 1,603:
if k < 1 or n < 1:
return 0
return
def main():
print
print
for i in
print
print()
for row in
print
for i in
l = lah(row, i)
print
print()
print
print
if __name__ == '__main__':
main()</syntaxhighlight>
{{out}}
<pre>Unsigned Lah numbers: L(n, k):
|