In this program, we will construct the following star pattern.
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*
Steps to solve the program
- Use for loop with range function to print the first 5 rows of the pattern.
- Use for loop with range function but in reverse order to print the last 4 rows of the pattern.
- Use -1 in the range function to print the pattern in reverse order.
Output :