Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ def armstrong():
print(n,"is an Armstrong number")
else:
print(n,"is not an Armstrong number")

def palin_pyramidpattern():

n = int(input("Enter the number of rows :"))
for i in range(1, n+1):
for k in range(1, i+1):
print(k, end = " ")
for l in range(i-1, 0, -1):
print(l , end = ” “)
Comment on lines +79 to +83
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this more efficient @SunandanChakrabarti ?
This is a very basic way to do it and can be improved if thought more!


print(“\n”)

if __name__=='__main__':
add()
Expand All @@ -80,5 +91,6 @@ def armstrong():
prime()
print_factors()
palindrome()
palin_pyramidpattern()