Answer:
titles =['name', 'physics', 'chemistry', 'math', 'programming']
student_1 =['Kathy', 90, 80, 75, 100]
student_2 =['John', 65, 84, 79, 90]
student_3 =['Joe', 45, 89, 100, 10]
student_4 =['Sarah', 68, 89, 93, 90]
all_info =[titles, student_1, student_2, student_3, student_4]
student = input("Enter student's name: ")
student_list = [name[0] for name in all_info]
if student in student_list:
print(all_info[student_list.index(student)][4])
if student not in student_list:
print("Student name does not exist.")
Explanation:
The python program prompts for user input "student" and the input is used to search and return the result of the student in the programming exam. If the name is not in the student_list, the program print an error message.