Deprecated: Creation of dynamic property spbcta_DB_Table::$table_name is deprecated in /home/u436376950/domains/codewithcurious.com/public_html/wp-content/plugins/coupon-reveal-button/inc/spbcta-plugin-db.php on line 15

Deprecated: Creation of dynamic property spbcta_DB_Table::$db_version is deprecated in /home/u436376950/domains/codewithcurious.com/public_html/wp-content/plugins/coupon-reveal-button/inc/spbcta-plugin-db.php on line 16
Reverse Pyramid Pattern Program : - CodeWithCurious

Reverse Pyramid Pattern Program :

Code :

#Reverse Pyramid Using Python www.codewithcurious.com
def ReversedPyramid(rows):
   k = 2* rows -2
   for i in range(rows,-1,-1):
      for j in range(k,0,-1):
         print(end=" ")
      k = k +1
      for j in range(0, i+1):
          print("*", end=" ")
      print("\n")
rows = 5
ReversedPyramid(rows)

Output :

Leave a Comment

Your email address will not be published. Required fields are marked *