0 of 6 problems solved • 0%

Exercise prompt

Translate a Point

A pair can be unpacked in one assignment, such as row, column = position. Pack related results into a tuple to return them together.

Example

def entry_label(entry): aisle, shelf = entry return f"Aisle {aisle}, shelf {shelf}" print(entry_label((4, 2))) # Aisle 4, shelf 2

Unpacking gives each position a name. The first item becomes aisle and the second becomes shelf.

Your task

Given a point (x, y) and an offset (dx, dy), return the translated point as a tuple.