xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to create and call a function with parameter in Python
Python Online Editor
Execute Code
More Python Sample Codes
# Function with single parameter def message(message): #message is function parameter return message # message parameter value will be returned string_value = message("Hello from parameter function") #parameter value of message is passed print(string_value) # Function with two parameters def add_number(x, y): # x & y are function parameters return x + y # Return the sum of parameter values integer_value = add_number(10, 20) #parameter values of x & y are passed to the function print("This method returns the sum of parameter values: " + str(integer_value)) # printing the return value