def place_ship(field, ship):
    """
    Place ship in a field.

    ARGUMENTS:
    field - a field in which to place the ship
    ship - the ship to place

    RETURNS:
    field with the ship placed
    """
    length = ship["length"]
    coords = ship["coords"]
    orientation = ship["orientation"]
    # for every spot occupied by ship, edit field to reflect this
    for i in range(length):
        position = []
        position.append(coords[0]+i*orientation[0])
        position.append(coords[1]+i*orientation[1])
        field[position[0]][position[1]]["content"] = "ship"
        field[position[0]][position[1]]["shipID"] = ship["id"]
    return field