MSE3114 Computational Methods for Physicists and Materials Engineers Midterm Examination
15:00-17:00 pm, 19 March 2021, Semester B 2020/21
(100 marks, 120 minutes)
NOTES:
1. Download the test sheet (midterm.docx or midterm.pdf) on your computer. Submit your answer
sheet through Canvas. Your submitted file should be in .html, .ipynb, .doc, .docx, .pdf, or .png
format. Submit this page showing your student ID and name.
2. You are allowed to use the lecture notes, the solutions to the assignments, Jupyter Notebook
and any IDE you like (e.g. Atom). You CANNOT communicate with people in any way.
3. There are 21 questions. Questions 1-10 are multiple-choice, accounting for 40 points (4 each).
Questions 11-20 are coding problems, accounting for 60 points. Question 21 is bonus.
4. As for the coding problems, you need to write down the code and show the running results on
the answer sheet.
5. For all the coding problems, you MUST use Python.
6. Please turn on your audio and camera such that the teacher and TAs could hear and see you.
Student ID: Student Name:
Page 1 of 2
1. Which operation on data array is NOT allowed by Python? ( )
A. x = (Gauss, Euler, Cauchy, Euler)
B. x = [Gauss, Euler, Cauchy, Euler]
C. x = {Gauss, Euler, Cauchy, Euler}
D. x = Gauss, Euler, Cauchy, Euler
2. There is a matrix
(a) Delete the third column of A, restore the rest in B, and display B.
(b) Delete the third row of A, restore the rest in C, and display C.
3. Consider the integral:
exp(xa)2 dx. 2
(a) Use SymPy to calculate this integral.
(b) Substitute a = 1 and = 0.1 into the result obtained in (a).
1 2 3 4 A=2 3 4 5.
3 4 5 6
Page 2 of 2
Reviews
There are no reviews yet.