Page 1 of 1

Write a Python program that reads from the command prompt the name, the university id number, and the marks of a student

Posted: Sat Nov 27, 2021 2:29 pm
by answerhappygod
Write a Python program that reads from the command prompt the name, the university id number,
and the marks of a student and then calculates his/her final mark. The marks consist of the
assignments and quizzes mark L, the tests mark M, and the final examination mark F. The
quizzes and assignments mark is the average of the marks obtained on three assignments and
three quizzes. The overall final mark should be computed according to the following formula:
Overall Final Mark = (1 - f)E + FL
Where
F = final examination mark (out of 100)
M = tests mark (out of 100)
E = 0.7F + 0.3M
L = quizzes and assignments mark (out of 100)
f = 0.005 |50 - E| + 0.005E - 0.25
The user will be prompt to input the following marks:
1. Three assignments each out of 20.
2. Three quizzes each out of 10.
3. Three tests each out of 30.
4. The final examination out of 70.
The marks M and L will be computed as follows:
M = Average of the best two test marks out of 100.
L = Average mark of the three assignments and quizzes out of 100.
The final examination mark will be computed out of 100. The best two test marks will be computed
as follows:
M1 = max (Test1, max (Test2, Test3))
M2 = (Test1 + Test2 + Test3) – min (Test1, min (Test2, Test3)) – M1
You need to import the math library in your project import math and use the max and min
functions defined there.
The output must be written to the command prompt showing the name, the identification number,
the marks, and the final grade of the student.
Student Name: Linda
Student Number: 2054893
Quizzes: 9, 8, 9.5
Assignments: 18, 17.5, 17
Tests: 29, 22.5, 24
Final Mark: 62
Final Grade: 88.2
P/s: Hand in a soft copy of the assignment via the drop box on BU Class. Your assignment
should be archived and given a name according to the following naming convention:
FirstName_LastName_StudentID.ra