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
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
Comments
Leave a comment