i am making a production frontier

it is basically set up but i have the following requirements


Create 2 columns of numbers. The 1st containing integers from 0 to 20 and
labeled “Apples”. The second should contain the following formula:

= SQRT(20^2 – {Whatever # of Apples are in the adjacent cell}^2)

Call that 2nd column “Oranges”. Create a line-connected scatter plot of the two and call the plot “Production Frontier”.

Pick one cell in the sheet and label it ‘Location’. Label the cell to the right of it ‘Direction’. Use the following to define the value inside Location :
= Location + Direction
Use an IF statement within the Direction cell that makes Direction equal to 1 if Location is less than or equal to 19, and -1 if Location is greater than or equal to 1. {Make sure to do this in the ‘iteration mode’}



Basically there are three cases you'll need to take action for:
1) When location is no longer <=19, you need to turn around (make direction=-1)
2) When location is no longer >=1, you need to start moving up again (make direction=1)
3) The rest of the time you need to "maintain" the direction

what do i put in the direction cell?