repl.it
@anonymous/

FuchsiaLeadingEastsiberianlaika

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
odds = list(range(1, int(input()) + 1, 2))
triangle = []
i = 1
while odds:
    triangle.append(odds[:i])
    del odds[:i]
    i += 1
mt = []
for layer in triangle:
    mt.extend([list(map('{: <4}'.format, layer)), ['/ \\ '] * len(layer)])
for space, layer in zip(range(len(mt) - 1, -1, -1), mt):
    print(' ' * space + ''.join(layer).rstrip())
Fetching token
?