Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdf04d94

Browse files
vysorpoyea
authored andcommitted
Some directories had a capital in their name [fixed]. Added a recursive factorial algorithm. (TheAlgorithms#763)
* Renaming directories* Adding a recursive factorial algorithm
1 parent48bba49 commitdf04d94

36 files changed

+13
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎Maths/abs.pyrenamed to‎maths/abs.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

‎maths/factorial_recursive.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
deffact(n):
2+
"""
3+
Return 1, if n is 1 or below,
4+
otherwise, return n * fact(n-1).
5+
"""
6+
return1ifn<=1elsen*fact(n-1)
7+
8+
"""
9+
Shown factorial for i,
10+
where i ranges from 1 to 20.
11+
"""
12+
foriinrange(1,21):
13+
print(i,": ",fact(i),sep='')
File renamed without changes.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp