{"id":12261,"date":"2021-09-30T15:00:56","date_gmt":"2021-09-30T09:30:56","guid":{"rendered":"https:\/\/python-programs.com\/?p=12261"},"modified":"2021-11-22T18:34:26","modified_gmt":"2021-11-22T13:04:26","slug":"python-program-to-print-pattern-with-a-combination-of-numbers-and-stars","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-pattern-with-a-combination-of-numbers-and-stars\/","title":{"rendered":"Python Program to Print Pattern with a Combination of Numbers and Stars"},"content":{"rendered":"

Don’t stop learning now. Get hold of all the important Java fundamentals with the Simple java program example<\/a> guide and practice well.<\/p>\n

Given the number of rows, the task is to Print pattern with a combination of Numbers and Stars 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 * 2 * 3 * 4 * 5 * 6 * 7 * 8 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 \r\n1 * 2 * 3 * 4 * 5 * 6 \r\n1 * 2 * 3 * 4 * 5 \r\n1 * 2 * 3 * 4 \r\n1 * 2 * 3 \r\n1 * 2 \r\n1<\/pre>\n

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

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

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

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

1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 \r\n1 * 2 * 3 * 4 * 5 * 6 * 7 \r\n1 * 2 * 3 * 4 * 5 * 6 \r\n1 * 2 * 3 * 4 * 5 \r\n1 * 2 * 3 * 4 \r\n1 * 2 * 3 \r\n1 * 2 \r\n1<\/pre>\n

Program to Print Pattern with a Combination of Numbers and Stars in C, C++, and Python<\/h2>\n

Below are the ways to print Print Pattern with a Combination of Numbers and Stars in C, C++, and Python.<\/p>\n