Skip to content

Commit

Permalink
Merge pull request #2295 from 16ratneshkumar/patch-5
Browse files Browse the repository at this point in the history
Clean code
  • Loading branch information
geekcomputers committed Aug 13, 2024
2 parents 8fa3458 + cfe67f6 commit ef550b4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions new_pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ def main():
lines = int(input("Enter no.of lines: "))
pattern(lines)

def pattern(lines):
t = 1
for i in reversed(range(lines)):
nxt_pattern = "$"*t
pattern = "@"*(i+1)
final_pattern = pattern + " n " + nxt_pattern
print(final_pattern)
t = t +1
def pattern(lines):
t = 1
for i in range(lines,0,-1):
nxt_pattern = "$"*t
pattern = "@"*(i)
final_pattern = pattern + " " + nxt_pattern
print(final_pattern)
t = t +1

if __name__ == "__main__":
main()
main()

0 comments on commit ef550b4

Please sign in to comment.