python_data_scien/poc2/poc2_mini_proj_4.py
def lower_row_invariant(self, target_row, target_col):
        """
        Check whether the puzzle satisfies the specified invariant
        at the given position in the bottom rows of the puzzle (target_row > 1)
        Returns a boolean
        """
        if 0 != self.get_number(target_row,target_col):
            return False

        for idx_i in range(target_row+1,self.get_height()):
            for idx_j in range(0,self.get_width()):
                if (idx_i,idx_j) != self.current_position(idx_i,idx_j):
                    return False

        for idx_k in range(target_col+1,self.get_width()):
            if (target_row,idx_k) != self.current_position(target_row,idx_k):
                return False

        return True

        Check whether the puzzle satisfies the specified invariant
        at the given position in the bottom rows of the puzzle (target_row > 1)
        Returns a boolean
        
Check whether the puzzle satisfies the specified invariant
at the given position in the bottom rows of the puzzle (target_row > 1)
Returns a boolean
Check whether the puzzle satisfies the specified invariant at the given position in the bottom rows of the puzzle ( target_row > 1 ) Returns a boolean
def lower_row_invariant(self, target_row, target_col):
        if 0 != self.get_number(target_row,target_col):
            return False
        for idx_i in range(target_row+1,self.get_height()):
            for idx_j in range(0,self.get_width()):
                if (idx_i,idx_j) != self.current_position(idx_i,idx_j):
                    return False
        for idx_k in range(target_col+1,self.get_width()):
            if (target_row,idx_k) != self.current_position(target_row,idx_k):
                return False
        return True
def lower_row_invariant ( self , target_row , target_col ) : if 0 != self . get_number ( target_row , target_col ) : return False for idx_i in range ( target_row + 1 , self . get_height ( ) ) : for idx_j in range ( 0 , self . get_width ( ) ) : if ( idx_i , idx_j ) != self . current_position ( idx_i , idx_j ) : return False for idx_k in range ( target_col + 1 , self . get_width ( ) ) : if ( target_row , idx_k ) != self . current_position ( target_row , idx_k ) : return False return True
Check whether the puzzle satisfies the specified invariant
at the given position in the bottom rows of the puzzle (target_row > 1)
Returns a boolean
Check whether the puzzle satisfies the specified invariant at the given position in the bottom rows of the puzzle ( target_row > 1 ) Returns a boolean
"""
        Check whether the puzzle satisfies the specified invariant
        at the given position in the bottom rows of the puzzle (target_row > 1)
        Returns a boolean
        """
self
target_row
target_col