Answer to Question #327658 in Python for Venkatesha

Question #327658

Digit 9

1
Expert's answer
2022-04-12T13:27:01-0400
size = int(input())
for i in range(size*2-1):
	if size == 1:
		print("*")
	elif i % (size-1) == 0:
		print("* "*size)
	elif i < size:
		print("* "+"  "*(size-2)+"*")
	else:
		print("  "*(size-1)+"*")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS