Create a python program that allows user to enter the following information – Name(string), Course(string), Score(float) and Grade(integer). Display the following information in this format:
<Name>, a <Course> student got a raw score of <Score> equivalent to <Grade> percent final grade.
# creating list to store all data
lst_1 = []
# number of students
n = int(input("Enter the number of the strudents: "))
for i in range(n):
# list for each student to record his/her data and then add data to list
lst = []
name = input("Enter the name of student: ")
lst.append(name)
course = input("Enter your course: ")
lst.append(course)
score = float(input("Enter the score: "))
lst.append(score)
grade = int(input("Enter the grades: "))
lst.append(grade)
# adding student data to main list
lst_1.append(lst)
print(lst_1)
# checking student details
x = input("Enter the name of student whose data you want to check: ")
for j in range(n):
if lst_1[j][0] == x:
print(lst_1[j][0], ", a ",lst_1[j][1], " student got a raw score of ",lst_1[j][2], "equivalent to ",lst_1[j][3], " percent final grade")
Comments
Leave a comment