Time until distance gets equal to X between two objects moving in opposite direction | Function to return the time for which the two policemen can communicate ; time = distance / speed ; Driver code
def getTime ( u , v , x ) : NEW_LINE INDENT speed = u + v NEW_LINE time = x / speed NEW_LINE return time NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT u , v , x = 3 , 3 , 3 NEW_LINE print ( getTime ( u , v , x ) ) NEW_LINE DEDENT