Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- h = int(input("Height: "))
- Total = 0
- for row in range(h):
- for col in range (h):
- if(row == h-1 or col == 0 or row == col):
- print ("*", end = " ")
- Total += 1
- else:
- print(end = " ")
- print()
- print("Total: ", Total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement