Hey, please can someone help me figure out a code for this function.

Name of function and its parameter
scores(web,pattern)

Description
returns an array of scores (each score is the number of times that pattern occurs in a content part in the arrayweb)