Quiz: Solve Equations with Python
Main.PythonQuiz14 History
Hide minor edits - Show changes to markup
(:title Quiz: Solve Equations with Python:) (:keywords quiz, test, Python, plot, linear, nonlinear, solve, equations, introduction, course:) (:description Learning assessment on solving linear and nonlinear equations with Python.:)
1. What is the solution to the following linear system of equations?
$$A x = b$$
where A is a matrix and b is a vector (both known) with vector x unknown.
(:div id=q1a:)
- Incorrect.
(:divend:)
(:div id=q1b:)
- Correct.
(:divend:)
(:div id=q1c:)
- Incorrect.
(:divend:)
(:div id=q1d:)
- Incorrect.
(:divend:)
2. What is a possible function to solve `x=A^{-1}b` in Python?
(:div id=q2a:)
- Incorrect. The array function builds a Numpy array.
(:divend:)
(:div id=q2b:)
- Incorrect. The solve function is in the linear algebra linalg package that is contained in numpy.
(:divend:)
(:div id=q2c:)
- Correct. Another potential strategy to solve the linear equations is with numpy.dot(numpy.linalg.inv(A),b).
(:divend:)
(:div id=q2d:)
- Incorrect.
(:divend:)
3. It is important to distinguish between linear and nonlinear equations to know which solution strategy to use. Select the equation that is nonlinear.
(:div id=q3a:)
- Incorrect.
(:divend:)
(:div id=q3b:)
- Incorrect.
(:divend:)
(:div id=q3c:)
- Correct.
(:divend:)