Python Program to Print Mirrored Rhombus Star Pattern

Write a Python Program to Print Mirrored Rhombus Star Pattern using a for loop.

# Python Program to Print Mirrored Rhombus Star Pattern
 
rows = int(input("Enter Mirrored Rhombus Star Pattern Rows = "))

print("Mirrored Rhombus Star Pattern") 

for i in range(0, rows):
    for j in range(0, i):
        print(' ', end = '')
    for k in range(0, rows):
        print('*', end = '')
    print()
Python Program to Print Mirrored Rhombus Star Pattern

This Python Program prints the Mirrored Rhombus Star Pattern using a while loop.

# Python Program to Print Mirrored Rhombus Star Pattern
 
rows = int(input("Enter Mirrored Rhombus Star Pattern Rows = "))

print("Mirrored Rhombus Star Pattern") 

i = 1

while(i <= rows):
    j = 1
    while( j < i):
        print(' ', end = '')
        j = j + 1
    k = 1
    while(k <= rows):
        print('*', end = '')
        k = k + 1
    i = i + 1
    print()
Enter Mirrored Rhombus Star Pattern Rows = 20
Mirrored Rhombus Star Pattern
********************
 ********************
  ********************
   ********************
    ********************
     ********************
      ********************
       ********************
        ********************
         ********************
          ********************
           ********************
            ********************
             ********************
              ********************
               ********************
                ********************
                 ********************
                  ********************
                   ********************
>>> 

In this Python example, we created a mirroredRhombus function to Print the Mirrored Rhombus Pattern. It replaces the star in mirrored Rhombus pattern with a given symbol.

# Python Program to Print Mirrored Rhombus Star Pattern

def mirroredRhombusStar(rows, ch):
    for i in range(0, rows):
        for j in range(0, i):
            print(' ', end = '')
        for k in range(0, rows):
            print('%c' %ch, end = '')
        print()
    
rows = int(input("Enter Mirrored Rhombus Star Pattern Rows = "))

ch = input("Symbol to use in Mirrored Rhombus Pattern = " )

print("Mirrored Rhombus Star Pattern")

mirroredRhombusStar(rows, ch)
Enter Mirrored Rhombus Star Pattern Rows = 15
Symbol to use in Mirrored Rhombus Pattern = #
Mirrored Rhombus Star Pattern
###############
 ###############
  ###############
   ###############
    ###############
     ###############
      ###############
       ###############
        ###############
         ###############
          ###############
           ###############
            ###############
             ###############
              ###############
>>>