Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

multiple parameters function in python

# Here we define the function with three parameters
def addtwo(a, b, c):
    added = a + b + c
    return added
# Here we call the function and give that value to a variable
# We must give three parameters when calling the function,
# if not it will give a Type Error
x = addtwo(3, 5, 10)
# Now we print the variable
print(x) # Output - 18
Source by www.py4e.com #
 
PREVIOUS NEXT
Tagged: #multiple #parameters #function #python
ADD COMMENT
Topic
Name
6+9 =