tri_height = int(input("Enter a number: ")) for i in range(tri_height): print("*"*(i+1)) for i in range(tri_height,0,-1): print("*"*(i-1))