<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encipher(self,string):
 """Encipher string using FracMorse cipher according to initialised key. Example:: ciphertext = FracMorse('ROUNDTABLECFGHIJKMPQSVWXYZ').encipher(plaintext) :param string: The string to encipher. :returns: The enciphered string. """
           
        string = string.upper()
        #print string
        morsestr = self.enmorse(string)
         # make sure the morse string is a multiple of 3 in length
        if len(morsestr) % 3 == 1:
            morsestr = morsestr[0:-1]
        elif len(morsestr) % 3 == 2:
            morsestr = morsestr + 'x'
        #print morsestr
        mapping = dict(zip(self.table,self.key))
        ctext = ""
        for i in range(0,len(morsestr),3):
            ctext += mapping[morsestr[i:i+3]]
        return ctext