Function to convert BCD to Decimal
def bcdToDecimal ( s ) : NEW_LINE INDENT length = len ( s ) ; NEW_LINE check = 0 ; NEW_LINE check0 = 0 ; NEW_LINE num = 0 ; NEW_LINE sum = 0 ; NEW_LINE mul = 1 ; NEW_LINE rev = 0 ; NEW_LINE DEDENT