Following are the python program to the given question:
Program Explanation:
Defining a method "print_sum" that takes three parameters "n, x, g".Inside the method, a "print" method is used that adds the value of the parameters and prints its value with the message.In the next step, the "n, x, g" variable is defined that inputs and store its value.At the last, the "print_sum" method calls that accept values.Program:
def print_sum(n,x,g):
print("The Sum : ",n+x+g)
n=int(input("Enter the 1st number: "))
x=int(input("Enter the 2nd number: "))
g=int(input("Enter the 3rd number: "))
print_sum(n,x,g)
Output:
Please find the output file in the attachment.
Learn more:
link
def print_sum(a,b,c):
print(a+b+c)
one = int(input("Enter the 1st number: "))
two = int(input("Enter the 2nd number: "))
three = int(input("Enter the 3rd number: "))
print_sum(one,two,three)
I wrote my code in python 3.8. I hope this helps.
What's your question?