Pseudocode help

A Robot Is Sitting In A Chair With Its Arms Facing Down.
make An Algorithm, Using Pseudocode, To Make The Robot:

1. Stand Up
2. Walk Forward Until It Senses A Wall
3. Turn Around
4. Walk Back To The Chair
5. Sit Down In Its Original Starting Position

Finally, Output The Total Number Of Steps Taken.

Commands

In Addition To Our Standard Pseudocode Commands, You Must Also Use The Following Robot Control Commands:
Sit
Stand
Step (One Step Forward)
Raise Arms (Parallel To Floor)
Lower Arms (Pointing To Floor)
Sense (Only If Arms Are Raised)
Turn (90 Degrees Right)

Immediately After Issuing A Sense Command, You Can Check Whether The Robot Is At The Wall As Follows:

If At Wall
Or Alternatively
If Not At Wall

Assumptions

You Must Assume The Following Facts:
The Robot’s Initial Sitting Position Is Directly Facing The Target Wall.
There Are No Obstacles Between The Robot And The Wall.
The Wall Is 1 Or More Exact Steps From The Chair.
The Wall Is Sensed When It Is Less Than 1 Step From The Robot’s Arms.
The Length Of The Robot’s Arms Are Slightly Less Than The Length Of 1 Step.

Your Solution Must Include All Of The Following: