IDNLearn.com offers a collaborative platform for sharing and gaining knowledge. Ask your questions and receive comprehensive and trustworthy answers from our experienced community of professionals.
Sagot :
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.
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:
brainly.com/question/16690412
We appreciate every question and answer you provide. Keep engaging and finding the best solutions. This community is the perfect place to learn and grow together. Find clear answers at IDNLearn.com. Thanks for stopping by, and come back for more reliable solutions.