Left Arrow Pattern

 Write a program to print the Left Arrow Pattern.You need to do that by  using two for loops only.

Input Format:
Take integer input from stdin.

Output Format:
Print the desired Pattern.

Example Input:
5

Output:


* * * * * * * * * * 

* * * * * * * * 

* * * * * * 

* * * * 

* * 

* * 

* * * * 

* * * * * * 

* * * * * * * * 

* * * * * * * * * * 




Solution:


n=int(input())

for i in range(n):

    for j in range(2*(n-i)):    #for upper half pattern

        print("*",end=" ")

    print()     #new line 

for i in range(1,n+1):    # for bottom half pattern

    for j in range(2*i):

        print("*",end=" ")

    print()



Comments

Popular posts from this blog

Right Arrow Pattern

Efficient Janitor

X Pattern