Print bottom half of hollow diamond pattern with alphabet symbols in reverse of Dictionary Order in Python

To print bottom half of hollow diamond pattern with alphabet symbols in reverse of Dictionary Order in Python

Code:

n = int(input('Enter n Value:'))
for i in range(n):
    print(' ' * i + chr(65 + i) + ' ', end='')
    if i != n - 1:
        print(' ' * (2 * n - 2 * i - 3) + chr(65 + i), end='')
    print()

Leave a comment