0% found this document useful (0 votes)
35 views3 pages

Essay Algebra 2023

The document describes a midterm essay assignment on applied linear algebra for IT students. It includes instructions for a programming part to implement tasks on matrices and vectors, and a report part to describe the solving methods and include images of the source code and outputs. Students must submit a Python source code file and PDF report that follows the specified formatting and submission guidelines.

Uploaded by

Mai Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views3 pages

Essay Algebra 2023

The document describes a midterm essay assignment on applied linear algebra for IT students. It includes instructions for a programming part to implement tasks on matrices and vectors, and a report part to describe the solving methods and include images of the source code and outputs. Students must submit a Python source code file and PDF report that follows the specified formatting and submission guidelines.

Uploaded by

Mai Nguyễn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

KHOA CÔNG NGHỆ THÔNG TIN

KỲ THI GIỮA KỲ HỌC KỲ 2

NĂM HỌC: 2022 – 2023

MIDTERM ESSAY: Applied Linear Algebra for IT


CODE: 501032

I. Rules
- Each essay is conducted by a group of one or two students.
- The essay consists of 2 parts: the Programming part and the Report part.
- Only use these Python libraries in the Programming part: math, numpy, sympy,
matplotlib.

II. Programming part


This part is consist of a programing task as follows:

Task 1(8.0 points). Create a matrix A with random integers [ ], a matrix


B with random integers [ ], and a matrix C with random integers [ ].
Implement the following requirements:

a(1.0 point). Calculate , and print the results to the screen.

b(1.0 point). Calculate ( ) ( ) ( ) ( ) ( ) , and print the


results to the screen.
c(1.0 point). Save odd rows of the matrix A into a new matrix, and print the resultant matrix to
the screen.
d(1.0 point). Save odd integer numbers in the matrix A into a new vector, and print the
resultant vector to the screen.
e(1.0 point). Save prime numbers in the matrix A into a new vector, and print the resultant
vector to the screen.
f(1.0 point). Given a matrix , reverse elements in the odd rows of the matrix D, and
print the resultant matrix to the screen.
g(1.0 point). Regarding the matrix A, find the rows which have maximum count of prime
numbers, and print the rows to the screen.

[ ]
- For ex., input matrix = [ ] output rows = {
[ ]

Explanation:

Applied Linear Algebra for IT Page 1/3


KHOA CÔNG NGHỆ THÔNG TIN

KỲ THI GIỮA KỲ HỌC KỲ 2

NĂM HỌC: 2022 – 2023

Row 1: [ ] has 2 prime numbers { }


Row 2: [ ] has 3 prime numbers { }
Row 3: [ ] has 1 prime number { }
Row 4: [ ] has 3 prime numbers { }
Therefore, the output rows are the 2nd and 4th rows, as they have maximum count of prime
numbers.
h(1.0 point). Regarding the matrix A, find the rows which have the longest contiguous odd
numbers sequence, and print the rows to the screen.

[ ]
- For ex., input matrix = [ ] output rows = {
[ ]

Explanation:
Row 1: [ ] has the longest contiguous odd numbers sequence { }
Row 2: [ ] has the longest contiguous odd numbers sequence { }
Row 3: [ ] has no contiguous odd numbers sequence
Row 4: [ ] has the longest contiguous odd numbers sequence { }
Therefore, the output rows are the 2nd and 4th rows, as they have the longest contiguous odd
numbers sequence.

Note: all sub-tasks are independent; thus, you could implement the tasks in an arbitrary order.
III. Report part
1. The report must be submitted in PDF format, and the content must be written based on the
report/essay format of the Faculty of Information Technology. In case students do not
follow the Faculty's format, they will receive 0 points for the Report part.
2. The report must include the following contents:
a. Chapter 1: Methodology of Solving Tasks (1 point)
Write a detailed description of the solving methods used in each Task 1d, 1e, 1f, 1g,
and 1h in the “Programming part”. For ex.:
 Initialize an empty list/numpy array
 Conduct a for loop to …

Applied Linear Algebra for IT Page 2/3


KHOA CÔNG NGHỆ THÔNG TIN

KỲ THI GIỮA KỲ HỌC KỲ 2

NĂM HỌC: 2022 – 2023

 Write a function to check a prime number


 ….
b. Chapter 2: Source codes and outputs (1 point)
Create images of all source codes and corresponding outputs in the “Programming
part”, and insert them into this chapter. The images must be clear, and properly laid out.
The images captions and descriptions are also required.
Hint: To get a clear and high quality image, you could make an image for each sub-
task’s source code/results.

IV. Submission guideline


- Filenames of the source code and the report files must be the Student IDs, for ex.,
o A group of only one student with student ID 521H1495 will submit a Python source
file named 521H1495.py and a report file named 521H1495.pdf
o A group of two students with student IDs 521H1234 and 522H4321 will submit a
Python source file named 521H1234_522H4321.py and a report file named
521H1234_522H4321.pdf
- Students submit a Python source file and a report file to the "MidTerm_Essay"
assignment on Google Classroom of the practical class.
- Students must ensure that the Python source files are not corrupted during execution. The
source code with errors will not be scored.
- Python source files must be saved in the correct format (file extension is .py). The source
files in the wrong format will not be scored.

V. Regulations
- The result of this essay will be the Midterm score.
- Student who copy their friends's essay will be scored 0.
- If a student's work shows signs of copying each other, the student will attend an
interview with the lecturer.

-- END --

Applied Linear Algebra for IT Page 3/3

You might also like