# Rita goes 20 km towards east from a point A to the point B. From B, she moves 30 km towards west along the same road. If the distance towards east is represented by a positive integer then, how will you represent the distance travelled towards west? By which integer will you represent her final position from A?"

#### Complete Python Prime Pack

9 Courses     2 eBooks

#### Artificial Intelligence & Machine Learning Prime Pack

6 Courses     1 eBooks

#### Java Prime Pack

9 Courses     2 eBooks

Given:

Rita goes $20 \mathrm{~km}$ towards the east from point $A$ to point $B$. From B she moves $30 \mathrm{~km}$ towards the west along the same road.

The distance towards the east is represented by a positive integer.

To do:

We have to find the final position from A.

Solution:

Distance towards the east is represented by a positive integer.

West is opposite to east.

This implies,

The distance in the direction of the west will be represented by a negative integer.

Rita goes $20 \mathrm{~km}$ towards the east from point $A$ to point $B$.

Let us consider $A$ as $0$.

Her position now is $+20$ km.

From B she moves $30 \mathrm{~km}$ towards the west along the same road.

Final position of Rita $=+20+(-30)$

$=20-30$

$=-10$ km

Therefore, the final position of Rita is $10\ km$ West of $A$.

Updated on 10-Oct-2022 13:31:00