print("Enter the number")
num1 = int(input())
print("Enter the status")
num2 = bool(input())
if(num2 == True and num2 != ''):
for i in range(1, num1):
for j in range(i):
print('X', end=' ')
print()
else:
for i in range(num1):
for j in range(i,num1):
print('p', end=' ')
print()
Thanks you for commenting your questions. I will see question and respond you.