{"id":25750,"date":"2021-12-04T09:20:00","date_gmt":"2021-12-04T03:50:00","guid":{"rendered":"https:\/\/python-programs.com\/?p=25750"},"modified":"2021-12-04T09:20:00","modified_gmt":"2021-12-04T03:50:00","slug":"python-program-to-perform-addition","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-perform-addition\/","title":{"rendered":"Python Program to Perform Addition"},"content":{"rendered":"

Given two numbers and the task is to find the addition of two numbers.<\/p>\n

Also, given a list and the task is to find the addition of all the elements in a given list.<\/p>\n

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

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

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

Given first number = 2\r\nGiven second number = 3<\/pre>\n

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

The addition of given two numbers { 2 + 3 } =  5<\/pre>\n

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

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

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

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

The sum of all the elements of a given list [4, 7, 3, 1, 5] = \r\n20<\/pre>\n

Program to Perform Addition in Python<\/h2>\n