In this program, we will print the following pattern using Python.
Steps to solve the program
- Print the first 5 lines of the patterns using a for loop.
- Multiply the number in the loop by *.
- Print the last 6 lines of the patterns using a for loop but in reverse order.
- Multiply the number in the loop by *.
for i in range(6):
print(i*"*")
for i in range(6,0,-1):
print(i*"*")
Output :
*
**
***
****
*****
******
*****
****
***
**
*