Answer to Question #191686 in Python for ken

Question #191686

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.


1
Expert's answer
2021-05-11T02:00:52-0400
# 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")
    

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS