def display_vote_lines(): with open("Elections.txt", "r") as f: for line in f: if "vote" in line: print(line.strip())This function opens the file "Elections.txt" in read mode.
def Change(X): for K, V in X.items(): L1.append(K) L2.append(V) D = {1: "ONE", 2: "TWO", 3: "THREE"} L1 = [] L2 = [] Change(D) print(L1) print(L2) print(D)
If \[ A = \begin{bmatrix} 2 & -3 & 5 \\ 3 & 2 & -4 \\ 1 & 1 & -2 \end{bmatrix}, \] find \( A^{-1} \).
Using \( A^{-1} \), solve the following system of equations:
\[ \begin{aligned} 2x - 3y + 5z &= 11 \quad \text{(1)} \\ 3x + 2y - 4z &= -5 \quad \text{(2)} \\ x + y - 2z &= -3 \quad \text{(3)} \end{aligned} \]