<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_wtscl(self, chip, wtscl_par):
 """ Sets the value of the wt_scl parameter as needed for drizzling. """

        sci_chip = self._image[self.scienceExt,chip]

        exptime = 1 #sci_chip._exptime
        _parval = 'unity'
        if wtscl_par is not None:
            if type(wtscl_par) == type(''):
                if not wtscl_par.isdigit():
                    # String passed in as value, check for 'exptime' or 'expsq'
                    _wtscl_float = None
                    try:
                        _wtscl_float = float(wtscl_par)
                    except ValueError:
                        _wtscl_float = None
                    if _wtscl_float is not None:
                        _wtscl = _wtscl_float
                    elif wtscl_par == 'expsq':
                        _wtscl = exptime*exptime
                        _parval = 'expsq'
                    else:
                        # Default to the case of 'exptime', if
                        #   not explicitly specified as 'expsq'
                        _wtscl = exptime
                else:
                    # int value passed in as a string, convert to float
                    _wtscl = float(wtscl_par)
            else:
                # We have a non-string value passed in...
                _wtscl = float(wtscl_par)
        else:
            # Default case: wt_scl = exptime
            _wtscl = exptime

        sci_chip._wtscl_par = _parval
        sci_chip._wtscl = _wtscl