How to make a pyramid?
I need to make a function, that prints a full pyramid.
For example
(13 is the base width of the pyramid and 1 is the width of the top row.)
pyramid(13, 1)
Result:
.
.....
.........
.............
The step should be 4, so each row differs from the last row by 4 dots.
Edit:
This is what I have so far, but I only got the half of the pyramid and the base isn't what it's supposed to be.
def pyramid(a, b):
x = range(b, a+1, 4)
for i in x:
print(" "*(a-i) + "."*(i))
pyramid(17,1)