Answer to Question #221167 in Python for Hari nadh babu

Question #221167

Hollow Right Triangle - 2


This Program name is Hollow Right Triangle - 2. Write a Python program to Hollow Right Triangle - 2, it has two test cases


The below link contains Hollow Right Triangle - 2 question, explanation and test cases


https://drive.google.com/file/d/1PZVCzgVyE2aBXnfrJWYXpUtAdeK_TkqD/view?usp=sharing


We need exact output when the code was run

1
Expert's answer
2021-08-01T00:29:33-0400
N=int(input())
m=1
for i in range(N,0,-1):
    for j in range(1,i):
        print(" ",end="")
    for k in range(1,m+1):
        if(k==1 or k==m or m==N):
            print("*",end="")
        else:  
            print(" ",end="")


    print("")
    m+=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