O Level Exam : Practical Question
📝 HTML
🎨 CSS
⚡ Java Script
import numpy as np # Initialize two square matrices A = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) B = np.array([[9, 8, 7], [6, 5, 4], [3, 2, 1]]) # Add the matrices C = A + B # Display the matrices print("First Matrix:") print(A) print("\nSecond Matrix:") print(B) print("\nSum of the Matrices:") print(C)
▶ Run Code
🖥 Output: