The correct answer is C. The parameter List in a procedure header is optional.
A function is a block of code that can be called from another part of the program. It can have parameters, which are variables that are passed to the function when it is called. The function can return a value, which is a variable that is assigned to the value returned by the function.
A procedure is similar to a function, but it does not return a value. It can also have parameters, which are variables that are passed to the procedure when it is called.
The parameter list in a procedure header is a list of the variables that are passed to the procedure. The parameter list is required for both functions and procedures.
The following is an example of a function declaration:
def add_numbers(x, y):
return x + y
In this example, the function add_numbers
has two parameters, x
and y
. The function returns the sum of x
and y
.
The following is an example of a procedure declaration:
def print_message():
print("Hello, world!")
In this example, the procedure print_message
does not have any parameters. The procedure simply prints the message “Hello, world!”.
In conclusion, the parameter list in a procedure header is required. Therefore, option C is false.