Skip to content

Commit e8b1235

Browse files
authored
Merge pull request openAOD#883 from sohilkhanduja/so
Various issues resolved
2 parents c2443a3 + 8b29acb commit e8b1235

20 files changed

+257
-0
lines changed

Symbol Patterns/symbolicpattern30.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
print("Enter the no of rows: ")
2+
a = int(input())
3+
counter = 1
4+
iter = 0
5+
for i in range(0, a):
6+
for j in range(0, a):
7+
if iter % 2 == 0:
8+
if j % 2 == 0:
9+
print("*", end=" ")
10+
else:
11+
print(chr(counter+64), end=" ")
12+
counter += 1
13+
else:
14+
if j % 2 != 0:
15+
print("*", end=" ")
16+
else:
17+
print(chr(counter+64), end=" ")
18+
counter += 1
19+
iter += 1
20+
print()

Symbol Patterns/symbolicpattern31.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
print("Enter the number of rows: ")
2+
n = int(input())
3+
counter = 1
4+
for i in range(0, n):
5+
for j in range(0, n):
6+
if counter == 1:
7+
if j == 0:
8+
print("*", end=" ")
9+
else:
10+
print("#", end=" ")
11+
elif counter == 2:
12+
if j in range(0, 3):
13+
print("#", end=" ")
14+
else:
15+
print("*", end=" ")
16+
elif counter == 3:
17+
if j in range(0, 3):
18+
print("*", end=" ")
19+
else:
20+
print("#", end=" ")
21+
counter = counter + 1
22+
if counter > 3:
23+
counter = 1
24+
print()

Symbol Patterns/symbolicpattern33.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
print("Enter the no of rows: ")
2+
a = int(input())
3+
counter = 1
4+
n = 1
5+
for i in range(0, a):
6+
for j in range(0, n):
7+
if j % 2 == 1:
8+
print("*", end=" ")
9+
else:
10+
print(counter, end=" ")
11+
counter += 1
12+
counter = 1
13+
n += 2
14+
print()

Symbol Patterns/symbolicpattern34.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
print("Enter the no of rows: ")
2+
a = int(input())
3+
counter = 1
4+
for i in range(0, a):
5+
for j in range(0, i + 1):
6+
print(str(counter) + "#", end=" ")
7+
counter += 1
8+
print()

Symbol Patterns/symbolicpattern36.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
print("Enter the no of rows: ")
2+
a = int(input())
3+
counter = 1
4+
for i in range(0, a):
5+
n = counter + i
6+
if i % 2 == 1:
7+
counter = n
8+
for j in range(0, i + 1):
9+
if i % 2 == 0:
10+
print(str(counter) + "#", end=" ")
11+
counter += 1
12+
else:
13+
print(str(counter) + "#", end=" ")
14+
counter = counter - 1
15+
counter = n + 1
16+
print()

Symbol Patterns/symbolicpattern37.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
print("Enter the no of rows: ")
2+
n = int(input())
3+
for i in range(0, n):
4+
for j in range(0, i+1):
5+
if i % 2 == 0:
6+
print("#", end=" ")
7+
else:
8+
print("*", end=" ")
9+
print()

Symbol Patterns/symbolicpattern38.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
print("Enter the no of rows: ")
2+
n = int(input())
3+
for i in range(0, n):
4+
for j in range(0, i+1):
5+
if j % 2 == 0:
6+
print("#", end=" ")
7+
else:
8+
print("*", end=" ")
9+
print()

Symbol Patterns/symbolicpattern39.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
print("Enter the no of rows: ")
2+
n = int(input())
3+
for i in range(0, n):
4+
for j in range(0, i+1):
5+
if i % 2 == 0:
6+
print(i+1, end=" ")
7+
else:
8+
print("*", end=" ")
9+
print()

Symbol Patterns/symbolicpattern40.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
print("Enter the no of rows: ")
2+
n = int(input())
3+
for i in range(0, n):
4+
for j in range(0, i+1):
5+
if i % 2 == 0:
6+
print(j+1, end=" ")
7+
else:
8+
print("*", end=" ")
9+
print()

Symbol Patterns/symbolicpattern41.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
print("Enter the no of rows: ")
2+
n = int(input())
3+
for i in range(0, n):
4+
for j in range(0, i+1):
5+
if j % 2 == 0:
6+
print(j+1, end=" ")
7+
else:
8+
print("*", end=" ")
9+
print()

0 commit comments

Comments
 (0)