Part 3:This is the scoresequence function and its head file