Respuesta :

The setter function named wonAward that takes a parameter for the name of an award and stores the award name in the awards array is as follows:

def wonAward(string):

    awards_array = []

    awards_array.append(string)

    return awards_array

print(wonAward("best student"))

Code explanation

The code is written in python.

  • We defined a function named "wonAward" and it takes a parameter called "string"
  • The declared variable awards_array is an empty list.
  • Then we append the string to the awards_array.
  • we return the awards_array
  • Finally, we call the function with the parameter.

learn more on function here: https://brainly.com/question/26104476

Ver imagen vintechnology
ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE