forked from hariom20singh/python-learning-codes
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPattern.py
More file actions
Latest commit
23 lines (17 loc) · 520 Bytes
/
Copy pathPattern.py
File metadata and controls
23 lines (17 loc) · 520 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# GitHub Username: ManishGhimire127
# Name: Ekraj Ghimire
# Function to demonstrate printing pattern in python
defpypart(n):
# outer loop to handle number of rows
# n in this case
foriinrange(0, n):
# inner loop to handle number of columns
# values changing acc. to outer loop
forjinrange(0, i+1):
# printing stars
print("* ",end="")
# ending line after each row
print("\r")
# Driver Code
n=5
pypart(n)