Write a program that will repeatedly take (for a student) input of this type: course_no, number_of_credits, and grade_received (eg. CSE101 4 A). These inputs are for the courses the student has done in the semester. If no input is given (i.e. just a return), that means no courses are left. From this data, print the transcript for the semester for the student as:
Course_no: grade
Course_no: grade
….
SGPA: n.nn (two decimal places)
In the transcript, the records should be printed such that they are sorted by the course_no (hint: when sorting a list of tuples/lists, the default sorting is with the first element of the tuple/list).
The course numbers are an alphanumeric string with capital letters in the start and digits at the end (e.g. CSE101, CSSS21), credits can be 1, 2 or 4, and grade can be A+ (10), A(10), A-(9), B(8), B-(7), C(6), C-(5), D(4), F(2) (the number in () is their numeric equivalent for SGPA calculation.) The SGPA is computed as (sum of: credits*grade/ total_credits). If any input is not valid, print a suitable message ("improper course no", "incorrect credit", or "incorrect grade") and ignore that input.
What I have tried:
while True:
course_no=int(input("enter course number: "))
number_of_credits=int(input("enter number of credits: "))
grade_received=int(input("enter grade received: "))
l1=[]
l1.append(course_no)
l1.append(number_of_credits)
l1.append(grade_received)