-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage_mod.py
More file actions
45 lines (40 loc) · 1.05 KB
/
package_mod.py
File metadata and controls
45 lines (40 loc) · 1.05 KB
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
39
40
41
42
43
44
45
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 28 11:33:07 2020
@author: Patil
"""
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()
class patter():
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()
class patte():
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()