Formal and Actual Parameters in Python
Below is the implementation of Formal and Actual Parameters in Python:
# a and b are formal parameters
def sum_numbers(a, b):
return a + b
# 3 and 5 are actual parameters
result = sum_numbers(3, 5)
print("Sum:", result)
Output
Sum: 8
Formal and Actual Parameters in Programming
In programming, parameters are variables or values passed to a function or method during its invocation. They enable the function to receive input data, perform operations, and optionally return a result.