Computer Science, asked by anas7979, 10 months ago


write a program to print following pattern

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

Answers

Answered by anilgj0759
0

Answer:

what is this person I can't understand this question

Answered by AskewTronics
0

Python program :

Explanation:

for x in range(1,5): #for the first half part

   for y in range(x):

       print("*",end="")

   print(" ")

for x in range(3,0,-1):#for the second half part

   for y in range(x):

       print("*",end="")

   print(" ")

Output :

  • The above code will print the above defined series.

Code Explanation;

  • The above code divide the series into two part the first part is printed by the help of two for loop, which prints the increasing series.
  • Then the second part which is decreasing series is also printed by the help of two for loop.

Learn More :

  • Python : https://brainly.in/question/14689905

Similar questions