Fall 2024 - CS441 - 1
Fall 2024 - CS441 - 1
Maximum Marks: 20
Instructions Due Date: 8 November
2024
The purpose of this assignment is to give you hands-on practice. It is expected that
students will solve the assignment themselves. The following rules will apply during the
evaluation of the assignment.
Students can write their code in Python interpreter either by installing it on your
system or using the following online compiler.
https://www.programiz.com/python-programming/online-compiler/
Students can copy/paste their Python Code into the submission interface as shown
below.
Virtual University of Pakistan SEMESTER FALL 2024
Snapshot Images can be inserted using the following highlighted option in the interface.
Lectures Covered
This assignment covers contents covered in Weeks 1-3.
Let suppose, you are a software developer tasked with building a Student Performance
Evaluation System for a university. Your job is to write a Python program that will randomly
generate student IDs, assign their marks in three subjects, and calculate their total marks,
average score, and final grade. The system should provide a clear and formatted report for
each student, displaying their details along with the calculated grade based on their
performance.
The university operator will input the number of students, and your system will:
Randomly generate a unique Student ID for each student (in the format:
BC145789234).
Assign random marks to each student in three subjects.
Calculate the total marks, average score, and assign a grade based on the average.
Print a detailed performance report for each student that includes their Student
ID, total marks, average score, and final grade.
Virtual University of Pakistan SEMESTER FALL 2024
Assignment Requirements:
2. Grade Calculation:
Write a function calculate_grade() that takes a student’s total marks and calculates
their average score. Assign a grade based on the following scale:
o A: Average >= 85
o B: 70 <= Average < 85
o C: 50 <= Average < 70
o D: Average < 50
Your program should work for any number of students provided by the user. It should
dynamically generate unique IDs, assign random marks, and produce individualized reports.
Submission Guidelines:
Paste your .py file code with proper comments explaining each function and its purpose.
Include a screenshot output for a sample run of your program with at least 5 students.
Note: Plagiarism will be checked for the solution provided. Marks will be
awarded based on your answer and plagiarism report.