Dremendo Tag Line

Print the given pattern in Python

print() - Question 5

In this question, we will see how we can print the given pattern in python programming using the print() function. To know more about print() function click on the print() function lesson.

Q5) Write a program in python to print the given pattern using print() function on the screen.

5
45
345
2345
12345

Program

print('5')
print('45')
print('345')
print('2345')
print('12345')

Output

5
45
345
2345
12345
video-poster