Skip to content

Commit f31b849

Browse files
author
Sagar Paul
committed
--------------------------------
1 parent 9acbfa3 commit f31b849

File tree

5 files changed

+45
-32
lines changed

5 files changed

+45
-32
lines changed

DSA-problems/.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/usr/bin/python3.9"
3+
}

DSA-problems/01.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

DSA-problems/02.py

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'''
2+
*
3+
* *
4+
* * *
5+
* * * *
6+
* * * * *
7+
'''
8+
9+
n = int(input("Enter number of rows: "))
10+
11+
row= 1
12+
13+
while row<=n:
14+
col = 1
15+
while col<=row:
16+
print(end="* ")
17+
col = col +1
18+
print()
19+
row = row + 1
20+
21+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'''
2+
*
3+
* *
4+
* * *
5+
* * * *
6+
* * * * *
7+
'''
8+
9+
n = int(input("Enter number of rows: "))
10+
11+
row= 1
12+
while row<=n:
13+
col = 1
14+
while col<=row:
15+
print(end="* ")
16+
col = col +1
17+
print()
18+
row = row + 1
19+
20+
21+

0 commit comments

Comments
 (0)