Position of a person diametrically opposite on a circle | Function to return the required position ; Driver code
def getPosition ( n , m ) : NEW_LINE INDENT if ( m > ( n // 2 ) ) : NEW_LINE INDENT return ( m - ( n // 2 ) ) NEW_LINE DEDENT return ( m + ( n // 2 ) ) NEW_LINE DEDENT n = 8 NEW_LINE m = 5 NEW_LINE print ( getPosition ( n , m ) ) NEW_LINE