0
Need help compliting the pyramid
How do i substract string? https://code.sololearn.com/cRDKV33Rf8MT/?ref=app
2 Answers
0
I need somehow using while loop to complete this to a sideway pyramid.
0
using your code:-
def play(pyramid_length):
r = "*"
while len(r) <= pyramid_length:
print(r.center(pyramid_length))
r += "**"
play(int(input("enter pyramid length: ")))