Skip to content

Commit f02b11f

Browse files
authored
Add files via upload
1 parent e9700ae commit f02b11f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

new_pattern.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 = 1
17+
for i in reversed(range(lines)):
18+
nxt_pattern = "$"*t
19+
pattern = "@"*(i+1)
20+
final_pattern = pattern + " n " + nxt_pattern
21+
print(final_pattern)
22+
t = t +1
23+
24+
if __name__ == "__main__":
25+
main()

0 commit comments

Comments
 (0)