{"id":20408,"date":"2021-09-11T15:38:20","date_gmt":"2021-09-11T10:08:20","guid":{"rendered":"https:\/\/python-programs.com\/?p=20408"},"modified":"2021-11-22T18:36:21","modified_gmt":"2021-11-22T13:06:21","slug":"python-program-to-find-sum-of-even-numbers-using-recursion-in-a-list-array","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-sum-of-even-numbers-using-recursion-in-a-list-array\/","title":{"rendered":"Python Program to Find Sum of Even Numbers Using Recursion in a List\/Array"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find Maximum and Minimum Elements in List\/Array Using Recursion<\/a><\/p>\n

Given a list and the task is to find the sum of even numbers using recursion in a given list in python.<\/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

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

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

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

Given List = [1, 6, 3, 7, 8, 4]<\/pre>\n

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

The Sum of Even Elements in a given list [1, 6, 3, 7, 8, 4] = 18<\/pre>\n

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

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

Given List = [14, 10, 2, 5, 8, 1, 4]<\/pre>\n

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

The Sum of Even Elements in a given list [14, 10, 2, 5, 8, 1, 4] = 38<\/pre>\n

Program to Find Sum of Even Numbers Using Recursion in a List\/Array in Python<\/h2>\n

Below are the ways to find the sum of even numbers using recursion in a given list in python:<\/p>\n