Answer to Question #345805 in Python for uppi

Question #345805

given an integer number n as input.write a program to print the hollow right angled traingular pattern of n lines.(note:there is a space after each asterisk(*) character)


1
Expert's answer
2022-05-30T08:16:16-0400
print("Enter n: ")
n = int( input() )


for i in range(n):
    print("*", end=' ')
for i in range(n):
    print("*".rjust(i*2))

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