Exercise: Extracting all the Students With Marks Greater Than Ten

Let’s try to get the names of all students who received combined marks greater than ten in all their quizzes.

We'll cover the following

Problem statement

You have been provided with a text file that contains the names of students along with their marks for four different quizzes, each graded out of five (5). This text file has content similar to the following:

Jim : 1 5 4 3
Andrew : 5 2 3 0
Tom : 0 3 4 1

Therefore, your task is to write the student_names() function, which takes in the text file’s filename and returns a list of those students that have combined marks of all their quizzes greater than 10.

Input

filename = 'test.txt'

Output

["Jim"]

Challenge

This problem has been designed for you to practice freely with it, so try to solve it on your own first. Take some time and think about the different concepts that we’ve explored in the course so far.

If you feel stuck, you can always check out the solution review provided in the next lesson.

Good luck!

Get hands-on with 1200+ tech skills courses.