Skip to content

Commit e9a526e

Browse files
authored
Merge pull request mouredev#6406 from juanchernandezdev/feature
#17 - Python
2 parents 89eca28 + b14c5c1 commit e9a526e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
### Python Iteration ###
2+
3+
#! for loop
4+
for num in range(1, 11):
5+
print(num)
6+
7+
#! while loop
8+
num = 1
9+
10+
while num <= 10:
11+
print(num)
12+
num += 1
13+
14+
#! recursion
15+
def num_printer(num = 1):
16+
if num > 10:
17+
return
18+
19+
print(num)
20+
num_printer(num + 1)
21+
22+
num_printer()

0 commit comments

Comments
 (0)