Print the following pattern using Python

In this program, we will print the following pattern using Python.

Steps to solve the program
  1. Print the first 5 lines of the patterns using a for loop.
  2. Multiply the number in the loop by *.
  3. Print the last 6 lines of the patterns using a for loop but in reverse order.
  4. Multiply the number in the loop by *.
				
					for i in range(6):
    print(i*"*")
for i in range(6,0,-1):
    print(i*"*")
				
			

Output :

				
					
*
**
***
****
*****
******
*****
****
***
**
*
				
			

check whether a string contains an integer or not

Print the table of a number

Leave a Comment