{"id":20310,"date":"2021-09-09T19:57:48","date_gmt":"2021-09-09T14:27:48","guid":{"rendered":"https:\/\/python-programs.com\/?p=20310"},"modified":"2021-11-22T18:36:23","modified_gmt":"2021-11-22T13:06:23","slug":"python-program-to-print-first-50-natural-numbers-using-recursion","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-print-first-50-natural-numbers-using-recursion\/","title":{"rendered":"Python Program to Print First 50 Natural Numbers Using Recursion"},"content":{"rendered":"

In the previous article, we have discussed Python Program to find the Normal and Trace of a Matrix<\/a><\/p>\n

The task is to print the first 50 natural numbers using recursion.<\/p>\n

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

Recursion is the process by which a function calls itself directly or indirectly, and the associated function is known as a recursive function. Certain issues can be addressed fairly easily using a recursive approach. Towers of Hanoi (TOH), Inorder \/Preorder\/Postorder Tree Traversals, DFS of Graph, and other analogous issues are examples.<\/p>\n

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

Program to Print First 50 Natural Numbers Using Recursion in Python<\/h2>\n

Below are the ways to print the first 50 natural numbers using recursion.<\/p>\n

Method : Using Recursion<\/h3>\n

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