================================================================================
  Question 32: NumPy 5x5 Matrix Slicing Operations
================================================================================

FULL QUESTION:
Create a 5 x 5 NumPy array with numbers from 1 to 25. Then do the following
using slicing:
1. Print the center 3 x 3 part of the array.
2. Print the reverse of the center 3 x 3 part.
3. Print the first 2 rows and last 2 columns.
4. Print all elements of the array in a single line.

SHORT QUESTION:
Demonstrates 2D array slicing on a 5x5 NumPy matrix including submatrix extraction, reversing slices, and flattening.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 32: NumPy 5x5 Matrix Slicing Operations

- Prerequisites: Python 3.x, NumPy (pip install numpy).
- Setup: None.
- How to Run: python question_32.py
- Expected Behavior: Creates 5x5 sequential matrix from 1 to 25 and displays the 4 required slicing results.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_32.py
--------------------------------------------------------------------------------
import numpy as np

matrix = np.arange(1, 26).reshape(5, 5)
print("Original 5x5 Array:")
print(matrix)
print("=" * 50)

center_3x3 = matrix[1:4, 1:4]
print("Center 3x3 Part:")
print(center_3x3)
print("-" * 50)

reversed_center = center_3x3[::-1, ::-1]
print("Reversed Center 3x3 Part:")
print(reversed_center)
print("-" * 50)

first2_last2 = matrix[:2, -2:]
print("First 2 Rows & Last 2 Columns:")
print(first2_last2)
print("-" * 50)

flattened = matrix.flatten()
print("All Elements in a Single Line:")
print(flattened)
--------------------------------------------------------------------------------
