По данному натуральному n ≤ 9 выведите лесенку из n ступенек, i-я ступенька состоит из чисел от 1 до
Python
# Считываем натуральное число n
n = int(input("Введите натуральное число n (n ≤ 9): "))
# Выводим лесенку из n ступенек
for i in range(1, n + 1):
print("".join(str(j) for j in range(1, i + 1)))
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.