hei = int(input('Enter a number: ')) for hei in range(1, hei +1): print('* ' * hei) hei = hei - 1 while hei > 0: print('* ' * hei) hei = hei - 1