Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input("Zadaj n: "))
- for index in range(1,n+1):
- print("*"*index)
- for index in range(1,n+1):
- print(" "*(n+1-index)+"*"*index)
- z = (1+(n-1)*2)
- for index in range(1,n+1):
- x = (1+(index-1)*2)
- y = int((z-x)/2)
- print(" "*y+"*"*x+" "*y)
- for index in range(1,n+1):
- x = (1+(index-1)*2)
- y = int((z-x)/2)
- if index == 1 or index == n:
- print(" "*y+"*"*x+" "*y)
- else:
- print(" "*y+"*"+" "*(x-2)+"*"+" "*y)
Add Comment
Please, Sign In to add comment