Task: 

Each student record is represented as a `tuple` and it consists of a student's matriculation number and name.

Example: `('B0094358N', 'Shao Hong')`

Write a function `get_student_name` that returns the name of a student, when a student's matriculation number and the student records are passed into the function as arguments. The string `'Not found'` should be returned if the matrix number does not match any of the records in the database.

* Input: `get_student_name('B2245467C', student_records)`
* Output: `'Yang Shun'`

Please help me check my code: 

```
def get_student_name(matric_num, records): 
    l = student_records

    for i in l:
        if matric_num == i[0]:
            return (i[1])
        elif matric_num != i[0]:
            continue
    if matric_num not in l:
        return ('Not found')

```

I get the error of hard-coding, but I don't know why.