filmov
tv
Code 126: Floyd's Triangle using Python | Mindtree Coding | 365 Days of Code

Показать описание
Title - Floyd's Triangle
Write a Python Program to display Floyd's triangle like this:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
"""
n = int(input())
count = 1
for i in range(n):
for j in range(i+1):
print(str(count)+" ", end="")
count += 1
print()
# Thanks
Write a Python Program to display Floyd's triangle like this:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
"""
n = int(input())
count = 1
for i in range(n):
for j in range(i+1):
print(str(count)+" ", end="")
count += 1
print()
# Thanks