Skip to content

Commit 479a2d1

Browse files
authored
Create pattern2.py
1 parent f02b11f commit 479a2d1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

pattern2.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#pattern
2+
#$$$$$$$$$$$
3+
# $$$$$$$$$
4+
# $$$$$$$
5+
# $$$$$
6+
# $$$
7+
# $
8+
9+
10+
11+
def main():
12+
lines = int(input("Enter no.of lines: "))
13+
pattern(lines)
14+
15+
def pattern(lines):
16+
t = 0
17+
m = lines + 1
18+
for i in reversed(range(lines+1)):
19+
pattern = "@"*(m)
20+
format = " "*t
21+
t = t + 1
22+
print(format + pattern)
23+
m = m -2
24+
if m <= 0:
25+
exit()
26+
27+
if __name__ == "__main__":
28+
main()

0 commit comments

Comments
 (0)