You are given a positive integer N .
Your task is to print a palindromic triangle of size N .
For example, a palindromic triangle of size is 5:
1
121
12321
1234321
123454321
You can't take more than two lines. The first line (a for-statement) is already written for you.
You have to complete the code using exactly one print statement.
for n in range(1,int(input("Enter a positive interger: "))+1):
print (((10**n - 1)//9)**2)
Comments
Leave a comment