{"id":12265,"date":"2021-09-30T15:00:34","date_gmt":"2021-09-30T09:30:34","guid":{"rendered":"https:\/\/python-programs.com\/?p=12265"},"modified":"2021-11-22T18:34:27","modified_gmt":"2021-11-22T13:04:27","slug":"python-program-to-print-a-unique-pyramid-pattern-of-digits","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-a-unique-pyramid-pattern-of-digits\/","title":{"rendered":"Python Program to Print a Unique Pyramid Pattern of Digits"},"content":{"rendered":"

If you are new to Java and want to learn the java coding skills too fast. Try practicing the core java programs with the help of the Java basic programs list<\/a> available.<\/p>\n

Given the number of rows, the task is to Print a Unique Pyramid Pattern of Digits in C, C++, and Python<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given number of rows = 8<\/pre>\n

Output:<\/strong><\/p>\n

1 \r\n1 2 1 \r\n1 2 3 2 1 \r\n1 2 3 4 3 2 1 \r\n1 2 3 4 5 4 3 2 1 \r\n1 2 3 4 5 6 5 4 3 2 1 \r\n1 2 3 4 5 6 7 6 5 4 3 2 1<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given number of rows = 7<\/pre>\n

Output:<\/strong><\/p>\n

1 \r\n1 2 1 \r\n1 2 3 2 1 \r\n1 2 3 4 3 2 1 \r\n1 2 3 4 5 4 3 2 1 \r\n1 2 3 4 5 6 5 4 3 2 1<\/pre>\n

Program to Print a Unique Pyramid Pattern of Digits in C, C++, and Python<\/h2>\n

Below are the ways to Print a Unique Pyramid Pattern of Digits in C, C++, and Python<\/p>\n