Step 1: Define a programming function.
A function is a discrete code segment designed to execute a specific task. It can be called from other parts of the program.
Step 2: Analyze the advantages of functions.
The primary advantages are modularity and code reuse. By encapsulating a task, the function can be executed repeatedly by simply calling it, avoiding code duplication. This adheres to the DRY (Don't Repeat Yourself) principle and enhances code readability, maintainability, and debugging.
Step 3: Evaluate the options.
(A) The main purpose is "creating reusable code blocks." Code is written once within the function and then used multiple times.
(B), (C), (D): While documenting, testing, and using conditional statements are programming activities, they aren't a function's primary objective. Functions benefit from documentation and testing, and frequently incorporate conditional statements, but their central function is to encapsulate and reuse logic.
Match List-I with List-II 
Choose the correct answer from the options given below: