mypatternsapp-shapes 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mypatternsapp_shapes-1.0.0/PKG-INFO +7 -0
- mypatternsapp_shapes-1.0.0/mypatternsapp_shapes.egg-info/PKG-INFO +7 -0
- mypatternsapp_shapes-1.0.0/mypatternsapp_shapes.egg-info/SOURCES.txt +7 -0
- mypatternsapp_shapes-1.0.0/mypatternsapp_shapes.egg-info/dependency_links.txt +1 -0
- mypatternsapp_shapes-1.0.0/mypatternsapp_shapes.egg-info/top_level.txt +1 -0
- mypatternsapp_shapes-1.0.0/patterns/__init__.py +4 -0
- mypatternsapp_shapes-1.0.0/patterns/patterns.py +28 -0
- mypatternsapp_shapes-1.0.0/setup.cfg +4 -0
- mypatternsapp_shapes-1.0.0/setup.py +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
patterns
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
def square():
|
|
2
|
+
print('you chose to print square pattern..............')
|
|
3
|
+
n = int(input('enter no of rows: '))
|
|
4
|
+
for i in range(n):
|
|
5
|
+
print('*' * n)
|
|
6
|
+
|
|
7
|
+
def right_angled_triangle():
|
|
8
|
+
print('you chose to print right angled triangle pattern..............')
|
|
9
|
+
n = int(input('enter no of rows: '))
|
|
10
|
+
for i in range(n):
|
|
11
|
+
for j in range(i + 1):
|
|
12
|
+
print('*', end = '')
|
|
13
|
+
print()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def pyramid():
|
|
17
|
+
print('you chose to print pyramid pattern..............')
|
|
18
|
+
n = int(input('enter no of rows: '))
|
|
19
|
+
for i in range(n):
|
|
20
|
+
print(' ' * (n - i - 1) + ('* ') * (i + 1))
|
|
21
|
+
|
|
22
|
+
def diamond():
|
|
23
|
+
print('you chose to print diamond pattern..............')
|
|
24
|
+
n = int(input('enter no of rows: '))
|
|
25
|
+
for i in range(n):
|
|
26
|
+
print(' ' * (n - i - 1) + ('* ') * (i + 1))
|
|
27
|
+
for i in range(n - 1):
|
|
28
|
+
print(' ' *(i + 1)+ '* ' * (n - i - 1))
|