<reponame>arc03/30-DaysOfCode-March-2021
'''
Program to print the following series upto n rows
      *
    * *
  * * *
* * * *
.
.
nth row
'''

def pattern(n):
     k = 2 * n - 2
     for i in range(0, n):
          for j in range(0, k):
               print(end=" ")
          k = k - 2
          for j in range(0, i + 1):
              print("* ", end="")
          print("\r")

n=int(input("Enter the number of rows: "))
pattern(n)

'''
Program to print the following series upto n rows
      *
    * *
  * * *
* * * *
.
.
nth row
'''

def pattern(n):
     k = 2 * n - 2
     for i in range(0, n):
          for j in range(0, k):
               print(end=" ")
          k = k - 2
          for j in range(0, i + 1):
              print("* ", end="")
          print("\r")

n=int(input("Enter the number of rows: "))
pattern(n)
Program to print the following series upto n rows       *     * *   * * * * * * * . . nth row