Python program to find sum of two numbers

In this article, we’ll look at a Python programme that uses the sum method to find sum of two numbers.

We’ll study a basic understanding of how to add two numbers using the function in the Python programming language in this article.


def sum(a,b):
    c=a+b
    return c
a=int(input("Enter value of a:"))
b=int(input("Enter value of b:"))
print("Sum of a and b is:",sum(a,b))
Output 

Enter value of a:4
Enter value of b:45
Sum of a and b is: 49

Leave A Comment

Your email address will not be published. Required fields are marked *