Skip to content

Commit 508c5d1

Browse files
committed
Add dir()
1 parent 4225889 commit 508c5d1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

module/dir_function/main.c

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import sequences
2+
3+
print(dir(sequences))
4+

module/dir_function/sequences.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def triangular_number(n):
2+
return int(n * (n + 1) / 2)
3+
4+
def square_pyramidal_number(n):
5+
return int(n * (n + 1) * (2 * n + 1) / 6)

0 commit comments

Comments
 (0)