I created the 'star' function to print triangle-shape stars.
I want to create 2 triangle stars next to each other like in this image:
But my function only prints one triangle star.
Only using 'star' function, How can i make 2 triangle stars?
s = ["*","* *","*****"]
def star(startpoint):
print(" "*(startpoint)+str(s[0]))
print(" "*(startpoint-1)+str(s[1]))
print(" "*(startpoint-2)+str(s[2]))
def star2(startpoint):
print(" "*(startpoint)+str(s[0]),end='')
print(" "*(startpoint+k)+str(s[0]))
print(" "*(startpoint-1)+str(s[1]),end='')
print(" "*(startpoint-1+k)+str(s[1]))
print(" "*(startpoint-2)+str(s[2]),end='')
print(" "*(startpoint-2+k)+str(s[2]))
I'd really appreciate it if you could help me.
question from:https://stackoverflow.com/questions/65862580/python-how-to-print-something-in-a-straight-line