<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setParameter(self, parameterName, index, parameterValue):
 """ Set the value of a Spec parameter. """

    spec = self.getSpec()
    if parameterName not in spec['parameters']:
      raise Exception("Unknown parameter: " + parameterName)

    setattr(self, parameterName, parameterValue)