elements=int(input("How many students: "));
the task is to make it so you can input students names and their mark and then for the code to print the students who got above the average mark and who got below. I have gotten the part where it prints what marks scored above the average however I am struggling to figure out how I can get it to print the name of student who got that mark.
Any help would be appreciated and sorry I do not know how to write a message on discord with the box around it.
students = [];
marks = [];
for x in range(elements):
name = input("Name of the student: ");
grade = int(input("Marks for that student: "));
students.append(name);
marks.append(grade);
average_mark = (sum(marks)/len(marks))
print(f"\nAverage Mark: {average_mark}\n")
print("students above average mark: ")
for x in marks:
if x > average_mark:
print(x);