-- THE QUESTION --
Input : 3
Output :
A B C
H I D
G F E
Input : 5 Output :
A B C D E
P Q R S F
O X Y T G
N W V U H
M L K J I
-- My progress: --
print("input :")
n = int(input())
alphabet= 65
for i in range(n):
print((n+i)*" ")
for j in range(i, i+n):
print(chr(alphabet), end=" ")
alphabet = alphabet + 1
print()
Input : 5
Output :
A B C D E
F G H I J
K L M N O
P Q R S T
U V W X Y
Input : 3
Output :
A B C
D E F
G H I
This is not so trivial as it may seem. Anyway, here's a very simplistic solution:
The code: