Diamond shape using Python
n=int(input("Enter size of diamond:"))
for i in range(1,n):
for j in range(0,n-i):
print(" ",end=' ')
for j in range(0,(2*i)-1):
print("*",end=' ')
for j in range(0,n-i):
print(" ",end=' ')
print()
for i in range(n,-1,-1):
for j in range(0,n-i):
print(" ",end=' ')
for j in range(0,(2*i)-1):
print("*",end=' ')
for j in range(0,n-i):
print(" ",end=' ')
print()
Diamond shape using Python
Reviewed by Shubham Prajapati
on
July 10, 2023
Rating:
No comments:
If you have any doubt so you can comment me then i will 100% help you ,Through comment Chat