-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodu.py
More file actions
38 lines (33 loc) · 964 Bytes
/
modu.py
File metadata and controls
38 lines (33 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class pattern:
def star():
n = int(input('Enter : '))
s=(n*2)-2
for i in range(1,n+1):
for sp in range(s): #Space
print(" ",end="")
s-=2
for j in range(i):
print((i+1)%2,' ',end="")
print()
def aPatt():
n = int(input('Enter : '))
s=(n*2)-2
for i in range(1,n+1):
for sp in range(s): #Space
print(" ",end="")
s-=2
for j in range(i):
print(chr(64+i),' ',end="")
print()
def ABCD():
n = int(input('Enter : '))
s=(n*2)-2
c=64
for i in range(1,n+1):
for sp in range(s): #Space
print(" ",end="")
s-=2
for j in range(1,i+1):
print(chr(c+j),' ',end="")
c+=j
print()