choppingbl0ck
New Coder
This is what I have so far. I'm told it's not acceptable. Any ideas on a different way to do this? I have to use loops
Here is the question
Python:
def print_pyramid(str,h):
if str=="right":
for i in range(h):
print('#' * (i+1))
elif str=="left":
for i in range(h):
print(' '*(h-i) + '#'*(i+1))
elif str=="both":
for i in range(h):
print(' '*(h-i-1) + '#'*(2*i))
Here is the question