Skip to content

Commit c97b7bf

Browse files
committed
[wip] Add defining functions
1 parent 49e4508 commit c97b7bf

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def foo(x = 1):
2+
print(x)
3+
4+
n = 3
5+
foo(n)
6+
foo()

flow/defining_functions/none.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def foo():
2+
"""This function does not return any value."""
3+
4+
print(foo())

flow/defining_functions/squares.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# the squars, n^2
2+
3+
def square(x):
4+
return x * x
5+
6+
n = 15
7+
for i in range(n):
8+
print(square(i), end = ' ')
9+
10+
print()

0 commit comments

Comments
 (0)