If the current digit is the missing digit , then keep the track of its sign
if ( c [ i ] == ' x ' ) : NEW_LINE INDENT xSignIsPositive = ( w == 1 ) NEW_LINE DEDENT else : NEW_LINE INDENT c_mod_11 = ( c_mod_11 + w * ( ord ( c [ i ] ) - ord ( '0' ) ) ) % 11 NEW_LINE DEDENT w = w * - 1 NEW_LINE