forked from codehouseindia/Python-Programs
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintpattern.py
More file actions
Latest commit
19 lines (18 loc) · 542 Bytes
/
Copy pathPrintpattern.py
File metadata and controls
19 lines (18 loc) · 542 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Input = Integer n
# Boolean = True or False
# if true if False
# * *****
# ** ****
# *** **
# * *
print("This is Program for Pattern Printing")
row=int(input("How many line You wish to print"))
pattern=int(input("Input 1 for Asending and 0 for Desending"))
ifpattern<=1:
n=bool(pattern)
print(pattern)
ifn==True:
foriinrange(1,row+1):
print("\n",end=" ")
forjinrange(1,i+1):
print("*",end=" ")