{"id":8247,"date":"2021-06-07T18:08:44","date_gmt":"2021-06-07T12:38:44","guid":{"rendered":"https:\/\/python-programs.com\/?p=8247"},"modified":"2021-11-22T18:38:38","modified_gmt":"2021-11-22T13:08:38","slug":"python-program-to-print-the-natural-numbers-summation-pattern","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-the-natural-numbers-summation-pattern\/","title":{"rendered":"Python Program to Print the Natural Numbers Summation Pattern"},"content":{"rendered":"

Natural Numbers:<\/strong><\/p>\n

Natural numbers are a subset of the number system that includes all positive integers from one to infinity. Natural numbers, which do not include zero or negative numbers, are also known as counting numbers. They are a subset of real numbers that include only positive integers and exclude zero, fractions, decimals, and negative numbers.<\/p>\n

Given a number the task is to print the natural numbers summation Pattern<\/p>\n

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

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

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

given number = 7<\/pre>\n

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

1 = 1\r\n1 + 2 = 3\r\n1 + 2 + 3 = 6\r\n1 + 2 + 3 + 4 = 10\r\n1 + 2 + 3 + 4 + 5 = 15\r\n1 + 2 + 3 + 4 + 5 + 6 = 21\r\n1 + 2 + 3 + 4 + 5 + 6 + 7 = 28<\/pre>\n

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

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

given number = 9<\/pre>\n

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

1 = 1\r\n1 + 2 = 3\r\n1 + 2 + 3 = 6\r\n1 + 2 + 3 + 4 = 10\r\n1 + 2 + 3 + 4 + 5 = 15\r\n1 + 2 + 3 + 4 + 5 + 6 = 21\r\n1 + 2 + 3 + 4 + 5 + 6 + 7 = 28\r\n1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36\r\n1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45<\/pre>\n

Program to Print the Natural Numbers Summation Pattern in Python<\/h2>\n

There are several ways to print the natural numbers summation pattern in Python some of them are:<\/p>\n