You are viewing a single comment's thread. Return to all comments →
thickness = int(input()) if thickness%2 == 1: design = 'H' # top cone for i in range(thickness): print((design*i).rjust(thickness-1)+design+(design*i).ljust(thickness-1)) # top pillar for i in range(thickness+1): print((design*thickness).center(thickness*2)+(design*thickness).center(thickness*6)) # middle belt for i in range((thickness+1)//2): print((design*thickness*5).center(thickness*6)) # lower pillar for i in range(thickness+1): print((design*thickness).center(thickness*2)+(design*thickness).center(thickness*6)) # lower cone for i in range(thickness): print((((thickness-i-1)*design).rjust(thickness)+design+((thickness-i-1)*design).ljust(thickness)).rjust(thickness*6)) else: print('enter odd number')
Seems like cookies are disabled on this browser, please enable them to open this website
Text Alignment
You are viewing a single comment's thread. Return to all comments →