Python Program To Print Diamond Pattern
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY1giu0clRDDiHIlsYf-lj5c20a0v3knEP4eTCwhum1eOrW17js6RuL-_Fv0cQ7T56rzwJlunpjkQJDQZTMPErqzKdjQjOK4WVJMqvjBeowzyEnyTA-Wl7vZjc3FrV_QA8dKLg-PwQZRt_/w200-h200/edited.jpg)
In this post, we are going to write a python program to print a diamond pattern of * like this. General idea : To print this diamond, we need to divide the diamond into two parts. One triangle with base down, then the triangle with base upwards. First, we need to print the triangle with base down, the triangle with base up. In the first row of the first triangle with base down, there are 4 spaces and then the * is printed. In the second row of the same triangle, there are 3 spaces and the 3 * are printed. In the third row 2 spaces and 5 * are printed and in the fourth row 1 space and 7 * printed. Finally, in the last row, no space, and 9 * are printed. Here the spaces are decreasing by 1 and no of * increasing by 2. In the first row of the second triangle with base upwards. 1 space and 7 * are printed. In the second row 2 spaces and 5 * printed. Then finally 4 spaces and 1 * are printed. In this one, the number of spaces is increasing by 1, and the number of * is decreasing by 2. Pr